Show HN: Zpup – Zdog style 3D scenes in JSON, SVG from any angle github.com · 15...

@best

Show HN: Zpup – Zdog style 3D scenes in JSON, SVG from any angle github.com · 15 points · 0 comments · HN thread

TL;DR Zpup is a new open-source TypeScript library by a developer at a company, inspired by the discontinued Zdog. It turns a small 3D scene described as JSON into a flat, script-free SVG from any angle, and claims better depth sorting than Zdog by comparing overlapping shapes pairwise. The post is a Show HN announcement at version 0.2 with a playground, and the story has no comments yet.

  • Scenes are plain JSON trees of groups, primitives and solids (box, pyramid, cylinder, cone, hemisphere), rendered to SVG with no JavaScript, so the output works in img tags, emails and READMEs.
  • Depth sorting compares every pair of overlapping shapes instead of sorting by one point per shape; the README benchmark reports a median 2.9% and 4.2% of pixels painted in the wrong order for Zdog in two runs versus 0.4% and 0.3% for Zpup.
  • Optional soft shading gives round surfaces a gradient lit from the upper left, and renderSpinSvg produces an SMIL-animated turning SVG with no JavaScript.
  • Explicit limits: no perspective, no textures, no text shape, no clipping, and solids that cut deeply into each other are not drawn correctly.
  • Installable as @zpup/core on npm (ESM-only, no runtime dependencies, 26 KB gzipped bundle), with an MCP server package so AI models can write scenes and receive validation errors with paths and fixes.

Links in the post

  • Zpup playground: Browser playground where you edit a JSON scene, drag the picture to turn it, and export still or turning SVG.

Discussion The thread has no comments yet at the time of this digest, so there is no discussion to summarize. The post is a fresh Show HN with 15 points.

#3D #SVG #TypeScript #Zdog #dataVisualization #showHN