simple-3d-svg

Dev tools

svg renderer

SHOW HN2025

206points
71comments
#305of 3,837 in 2025
Top 8%of 2025 by points

How HN took it

RoastedHalf or more of the comments are critical

4 positive, 13 neutral or asking, 0 mixed, 19 critical, out of 36 comments about the project. Thread score -0.27.

Idea: 2 for, 10 againstExecution: 1 for, 5 againstPerformance: 0 for, 4 againstDesign: 1 for, 0 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Clever technique and cool to see SVG doing 3D projection.

    From 3 comments
    • This is seriously cool! I've always mentally boxed SVG into the 2D corner, so seeing it handle 3D projection like this is pretty mind-bending...
      dedicate on HN
    • Awesome. If this gets really popular I could imagine perspective transforms being proposed for SVG itself.
      stuaxo on HN
    • The goal for this vanilla TS renderer is to have visual diffing on GitHub and a renderer that works without a browser environment. Most 3D renderers focus on realtime speed, not…
      seveibar on HN

Objections

  • The perspective math is wrong; diagonals curve and squares look equal area.

    From 3 comments
    • I don't think your algorithm is correct. At least on the checkerboard example on the cube face the diagonals are curved. Perspective transformation doesn't do that. Possibly you…
      badmintonbaseba on HN
    • Even more obviously, the squares in the front aren’t bigger than the squares in the back. It looks like each square has equal area even as their shapes change. It’s fascinating…
      mistercow on HN
    • I think the original commenter is correct that there is a mistake in the perspective code. It seems the code calculates the linear interpolation for the grid points too late. It…
      Masterjun on HN
  • SVG is the wrong tool; performance will suffer with many elements.

    From 3 comments
    • "it's a lightweight SVG renderer" Meanwhile.. drawing 512 subdivisions for a single textured quad. It's a cute trick, certainly, but ask this thing to draw anything more than a…
      jesse__ on HN
    • SVG is the wrong tool for this job.
      leptons on HN
    • I think you'll probably run into performance problems with SVG before you get too far. I can't imagine SVG will perform fluidly with complex circuit boards. SVG elements are DOM…
      leptons on HN

Requests

  • Use WebGL or a plain JS rasterizer instead.

    From 2 comments
    • "it's a lightweight SVG renderer" Meanwhile.. drawing 512 subdivisions for a single textured quad. It's a cute trick, certainly, but ask this thing to draw anything more than a…
      jesse__ on HN
    • Why use SVG for this, though? This could be easily implemented as pure JS software rasterizer without all the tessellation workarounds.
      kookamamie on HN

Questions

  • Why use SVG for this rather than a canvas or PNG?

    From 3 comments
    • Why use SVG for this, though? This could be easily implemented as pure JS software rasterizer without all the tessellation workarounds.
      kookamamie on HN
    • This doesn't answer the question. If you're doing all this work in JS to render a static SVG, why not just "do it right" and output a static PNG instead?
      itishappy on HN
    • When things like Three.js exist, developing an SVG 3D engine to display circuit boards seems like a ridiculous thing to do. Why did you feel you had to do this with SVG?
      leptons on HN

Alternatives named

  • Three.js

    From 2 comments
    • When things like Three.js exist, developing an SVG 3D engine to display circuit boards seems like a ridiculous thing to do. Why did you feel you had to do this with SVG?
      leptons on HN
    • Three.js has had an SVG rendering back end for 13 years. It's going to be pretty hard to get much more popular than Three.js to get over the browser vendors' reluctance to make…
      moron4hire on HN
  • WebGL

    From 1 comment
    • "it's a lightweight SVG renderer" Meanwhile.. drawing 512 subdivisions for a single textured quad. It's a cute trick, certainly, but ask this thing to draw anything more than a…
      jesse__ on HN
  • librsvg

    From 1 comment

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/44187645)