2021年4月12日星期一

React native WebView: dynamically loading static assets

I am trying to dynamically load files in a WebView. I can use an ajax call out to fetch from a server but can not figure out how I would load the resources if they are in the assets folder.

DETAILS: I am loading a three js scene from the local file system using:

 <WebView source= />  

I have maybe 10 local models in the asset folder and would like to load a specific model when the user selects it. How would this be done using a THREE js loader? If a loader cant be used, can I fetch the model and pass it into the loader manually?

Basically is it possible to have a webview access the local file system in react-native?

https://stackoverflow.com/questions/67060699/react-native-webview-dynamically-loading-static-assets April 12, 2021 at 10:56PM

没有评论:

发表评论