Show HN: A CSS 3D Engine (no WebGL)(github.com) |
Show HN: A CSS 3D Engine (no WebGL)(github.com) |
Which is a long way of saying I appreciate how challenging this probably was to figure out. I love stuff like this.
For me, the interesting case is smaller low-poly or voxel scenes where loading a full 3D stack may be overkill, and where keeping the scene in DOM/CSS gives you easier integration with normal layout, styling, events, etc. Once you have the HTML, you don't even need to load the library to render a static model.
Also, part of the experiment is testing the browser’s limits and getting a clearer sense of where this approach works, where it breaks down, and what the tradeoffs are.
Cheers!
Would you recommend this for hacking around or not?
Whereas THREE.js or webgl is purpose-built for realtime animated 3d scenes.
https://benjaminaster.com/css-minecraft/
It's been on HN before ( https://news.ycombinator.com/item?id=44100148 )
We haven't built it yet, but its on the roadmap
I'm having a hard time seeing it. My experiments with CSS animation have always performed much better in CSS than JS (again, excluding it being pure webgl/canvas JS).
And ofc there's the nice bonus that it works if I haven't chosen to trust and whitelist their website for JS yet.
The gallery has been updated with more models. Compare the same model in PolyCSS vs. Three.js:
https://polycss.com/gallery/?model=205023689 (13 fps)
https://threejs.org/examples/#webgl_animation_skinning_morph (60 fps)
It could also be helpful in scenarios where JS is restricted - emails? iframes? bulleting board user content? Dunno. Trying to come up with some that aren't just "nemo was running umatrix and doesn't trust your site just yet"
Of course that the animations won't map to all the animations you can manage with js.
So, saying that CSS would be worse than JS as a feature for this project did not really make sense. We weren't talking about "should the project even exist" (I feel it should and it's awesome ;) )