How to render 3D model like OBJ,FBX in react native?

Title: Rendering 3D Models in React Native Using expo-three: Facing Issues with Setup and Rendering

Description:

I’m currently in the process of integrating 3D model rendering into my React Native project using expo-three. However, I’m encountering difficulties setting it up correctly and getting the models to render as expected.

Issue Details:

I’ve followed guidance provided in a GitHub issue comment (Link to GitHub Issue) related to expo-three.

I’m seeking further guidance or insights from the community on how to successfully set up and render 3D models using expo-three in my React Native project. Any assistance, tips, or alternative solutions would be greatly appreciated.

Thank you for your help and insights!

I’m kinda confused as to what expo-three is…

Its a toolkit for allowing code written in javascript, to run in… javascript and react?

Does react not allow you to create a canvas or something?

Is this something similar to react-three-fiber?

I’m doing this in react native not react.js. Some people recommend me to use expo-three for rendering 3D objects in react native mobile app.

1 Like
  1. Expo uses React Native and the native GLView rendering instead of mobile WebView - making it faster than WebGL.
  1. expo-gl repo, you’ve linked an issue from, is no longer maintained - please consider following expo/expo:expo-gl instead, as it was all moved to a monorepo.

  2. This part of r3f docs may be able to help you - you can either implement expo/expo:expo-asset yourself, or use @react-three/fiber/native - which will handle all the native magic for you.

1 Like

it’s native emulation, threejs or rather webgl runs on openGLES without browser, dom, webview. react-native is basically a javascript runtime with native backend/controls/ui.

as for react-three-fiber for native, it also uses expo. though it eliminates all the hinderances that would normally block you. threejs is written for the web and uses web tech (pointer events, fetch, wasm, workers, images, etc). there is an adaption layer in fiber that takes care of this stuff. in essence you can take your existing app, as is, and run it. i’m not sure if it’s really faster but there’s no input lag at least which is caused by the slow dom.

1 Like