3 ms·
This is cool but if you haven't already, check out what Three.js can do in the browser: https://codesandbox.io/s/lxvqek?file=/src/App.js https://codesandbox.io/
by satvikpendem 4y ago
This is cool but if you haven't already, check out what Three.js can do in the browser: https://codesandbox.io/s/lxvqek?file=/src/App.js https://codesandbox.io/s/lxvqek?file=/src/App.js
This is using a wrapper called react-three-fiber to make the code more declarative rather than imperative.
- bradwoodsio 4y agoIf your doing heavy 3D work, three.js / r3f are totally are good fit. But may be overkill for smaller requirements. They come with a big package payload cost.
- gfd 4y agoIIRC three.js even supports using a CSS renderer out of the box: https://threejs.org/docs/#examples/en/renderers/CSS3DRenderer https://threejs.org/docs/#examples/en/renderers/CSS3DRendere... (as opposed to webgl or webgl2 renderers) This means you can reuse the same code and fallback to rendering triangles with CSS transform matrix3d if the browser doesn't have webgl. (but of course w/o shader materials etc)