Replies: 3 comments 7 replies
-
react-spring may be a different case, r3f is a reconciler (https://github.com/facebook/react/tree/master/packages/react-reconciler), and from what i remember preact is just a web framework with reacts component model. react on the other hand is a cross platform component standard while the reconcilers (react-dom, react-native, r3f, etc) job is to express that on various platforms. |
Beta Was this translation helpful? Give feedback.
-
@Astrak, you could check https://github.com/brainkim/crank-three-boxes for cutting edge minimalist threejs usage with JSX syntax. It is still raw and not for production, but hope that one day we will got crank-three-fiber from @drcmda as well. |
Beta Was this translation helpful? Give feedback.
-
Hi, if you're still following this: I've published a library called three-elements as an alternative to react-three-fiber. The main difference is that three-elements does not have a dependency to React (or any other framework), but instead does all the Three.js magic through Web Components. The aim is to allow you to write react-three-fiber-like applications with any HTML framework you prefer (or even none at all). Some of its API ergonomics still have some way to go before it gets as nice to use as react-three-fiber. If you're interested in the current state of using the library with Preact, here's a codesandbox. (Please note that this sandbox deliberately skips the build step, which is why it's not using JSX, but the whole thing will of course also work with JSX and a build step.) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Preact has a syntax that matches React's, with some benefits on the performance side for critically computation-heavy apps. Which leads me to the question: I don't know the source code of react-three-fiber but was wondering, would it somehow be possible to use R3F with Preact? I guess the types wouldn't match? Or that even the question may be out of scope for a React framework, cause even a small work would mean maintaining a new repo for "preact-three"? Thanks
EDIT: also found on spectrum for react-spring: https://spectrum.chat/react-spring/general/react-spring-with-preact~d5918a30-d2a0-4f35-9d3f-c8cfcf0ffc37
Beta Was this translation helpful? Give feedback.
All reactions