How to use WebGL-based view in React Native?


(Jimmy Zhang) #1

I need to render a 3D model in React Native. The Viewer I’m using now is from the following link:
https://developer.autodesk.com/en/docs/viewer/v2/overview/

I have followed the tutorial and made the model successfully rendered in the website. Then I use WebView in react native to load the same html file and the model is also rendered in the mobile.

<WebView source={require('./viewer.html')} />

Is this the correct way to implement? Also, I can only use this way to render 1 model because the model id is specified in the html file, if I want to change the model to be rendered, how can I pass the model id into the html file and re-render the html file in the WebView?