I am looking for solution to integrate React Native with three.js. From what I've know, three.js runs in DOM. Is there any way to use three.js in without render to DOM? I use three.js for render 3D object. The example can be looked at https://github.com/tweedegolf/minecraft-character-configurator, and need solutions to port into React Native. Thanks :)
react-three-fiber is a React renderer for threejs. Build your scene declaratively with re-usable, self-contained components that react to state, are readily interactive and can participate in React's ecosystem.
React Native uses a JavaScript runtime, but the UI is not HTML and it doesn't use a WebView. You use JSX and React Native specific components to define the UI. It provides a native-level performance and look and feel but some UI parts have to be configured separately for iOS and Android.
Fiber is compatible with React v18. 0.0+ and works with ReactDOM and React Native. Getting started with React Three Fiber is not nearly as hard as you might have thought, but various frameworks may require particular attention.
You could look at Expo's GLView component, as well as expo-three, their Three.js integration. It is pretty buggy at the moment but you might get results.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With