Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why use SVG for this, though? This could be easily implemented as pure JS software rasterizer without all the tessellation workarounds.



> The goal for this vanilla TS renderer is to have visual diffing on GitHub and a renderer that works without a browser environment


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?


The top of the PCB (the lines etc) are computed as an SVG, i would have to have an SVG rasterizer just to begin with that approach, then would be limited by what images I could rasterize. It would also be much much slower than quickly computing matrices


You might find that librsvg works for you.


I was going to suggest raylib for server-side rendering, but it adds a non-JS dependency. Apparently it has optional support for rendering SVGs to textures.

https://github.com/raysan5/raylib/discussions/3741




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: