stuaxo 2 days ago

Awesome. If this gets really popular I could imagine perspective transforms being proposed for SVG itself.

2
chrismorgan 2 days ago

I’m not certain, but I think Firefox just implemented 3D transformations for SVG from the start. It wasn’t exactly hard to conceive. Certainly by mid-2017 it had it. Somewhere around that time there was also concerted effort toward aligning SVG and CSS.

(Firefox’s implementation does still suffer from one long-standing bug which means you want to make sure your viewbox unit is larger than one device pixel, but that’s normally not hard to achieve. https://oreillymedia.github.io/Using_SVG/extras/ch11-3d.html... shows what it’s about. I don’t really understand why that problem isn’t fixed yet; what I presume is the underlying issue affects some HTML constructs too when you scale things up, and surely it’s not that rare? I know I found one such problem a decade ago (and, being in HTML, it couldn’t be worked around like you can with SVG). They’ve improved things a bit, but not entirely.)

Sadly, no one else seemed all that interested in making 3D transformations work properly in SVG content.

moron4hire 2 days ago

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 any changes to SVG.