4 ms·
Performance looks good: https://react-vertex.com/demo-attenuated-light/ https://react-vertex.com/demo-attenuated-light/ Ease-of-use looks good: https://github.
by gunn 7y ago
Performance looks good: https://react-vertex.com/demo-attenuated-light/ https://react-vertex.com/demo-attenuated-light/
Ease-of-use looks good: https://github.com/sghall/react-vertex/blob/master/demos/AttenuatedLight/Scene.js https://github.com/sghall/react-vertex/blob/master/demos/Att...
Looks excellent actually.
- csande17 7y agoRendering a single static 3D object lit by one point light isn't much of an achievement these days -- I'd be curious to see how this performs with hundreds/thousands of elements moving around on the screen at once. My experience with React suggests the answer is "not well." (But I'd be happy to be proven wrong on that point!)
- gunn 7y agoFor sure it would be nice to see some stress tests of performance. From my experience with React, if it's used properly so that the entire component tree isn't rendered every frame, I would expect the overhead of using to be almost nil. You can see in the examples the author using React.memo for this.
- yoklov 7y agoSure, but you can't really avoid rerendering every frame with OpenGL. (Not without a lot of tricky caching, at least, which has it's own costs). Not saying this is impractical (Personally, I wouldn't bet on it, but I'm sure it's fine for some things), so much as that the cost model here is fundamentally different.
- gunn 7y agoThe WebGL view might rerender every frame, the react component tree doesn't have to.
- deleted 7y ago[deleted]
- JTenerife 7y agoAgreed that this is trivial model. Regarding React: In many webgl use-cases UI-framework overhead can be neglected as the user interacts either with the scene or the UI rendered by the framework. The browser doesn't usually need to update the DOM and the scene in one frame.
- gridlockd 7y agoI think the question here is how well React Hooks and their reconciliation perform "at scale". What may not be a problem with a couple of 2D UI elements may turn into a disaster in a non-trivial 3D scene.