3 ms·
The thing that excites me is using the react component paradigm for non DOM stuff like canvas and webGL.
by Waterluvian 7y ago
The thing that excites me is using the react component paradigm for non DOM stuff like canvas and webGL.
- ioquatix 7y agoUnfortunately, history shows us that it's a terrible idea from a performance perspective.
- Jasper_ 7y agoIt's also a very strange way to write a renderer, since you want your renderer to be pass-based, rather than object-based. React + Three.JS is just the wrong level of abstraction, since Three.JS a scene graph toolkit.
- deleted 7y ago[deleted]
- mlsarecmg 7y agoReact has hooks. They are essentially algebraic effects. Check out some of the demos here: https://github.com/react-spring/react-three-fiber https://github.com/react-spring/react-three-fiber and look for "useFrame". useFrame binds a single component to the render-loop. But in a managed way. Once the component unmount, it's getting taken out. You can also stack calls like that with something like a z-index, which is awesome for effects. This game uses some of it: https://codesandbox.io/embed/react-three-fiber-untitled-game-i2160 https://codesandbox.io/embed/react-three-fiber-untitled-game...
- fenwick67 7y agoWhy is this exciting?
- crubier 7y agoYou tell react what you want your scene graph to look like in the end. You don’t have to write down how to update. Which removes a whole class of bugs AND simplifies code A LOT
- HereBeBeasties 7y agoFlutter looks like it could be quite interesting for this - on mobile it compiles over to native machine code and uses GL or whatever. I haven't looked at the details for web, but I think it does webasm and canvas, etc. and with the architecture they have it could potentially be a lot faster than traditional JS frameworks https://flutter.dev/web https://flutter.dev/web