Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Unfortunately, history shows us that it's a terrible idea from a performance perspective.


It'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.


React has hooks. They are essentially algebraic effects. Check out some of the demos here: 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...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: