logoalt Hacker News

Rohansitoday at 7:47 PM1 replyview on HN

I meant slower vs. WebGL rendering, which requires JS. Each triangle is rendered as a DOM node. There can be thousands of triangles in a single model.

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)


Replies

capitainenemotoday at 8:53 PM

Oh. Sure, that is pretty obvious. A triangle in webgl is so much more lightweight than building it out of DOM elements but this was more about "if one is going to use this CSS system, why not support a pure CSS viewing mode" - which right now, it does not - rotation requires JS and is pretty stuttery. I was thinking it should actually be a bit smoother if there was a "toggle on/off rotation using a CSS animation" option. Plus, something like that could easily be done in pure CSS if JS was disabled, which would make the output all the more accessible and offer a good usecase.

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"

show 1 reply