rastapasta/react-native-gl-model-view

How to display .obj files from Android phone local store

nickwansi opened this issue · 5 comments

Hello everyone, is someone who knows how to display .obj files from device file system ? I don't want to save it in assets folder. Thank you in advance....

You can use something like RNFetchBlob to get the paths of other directories and then retrieve files from there.

const dir = RNFetchBlob.fs.dirs.DocumentDir;
const modelPath = dir + '/model.obj';

Then pass modelPath to the model prop

Hi Dylan,

I tried to use the RNFetchBlob library as you advised me but I get no rendering. I just have a white window. I also tried to use the react-native-fs library but the results are the same.Please can you advise me something else? Thank you in advance....

@nickwansi I've done this in projects of mine, exactly as described, so it isn't my solution that's your problem.

@Dylan-at-LION , please can you share the file file where you did it ? Sorry for the inconvenience... Thank you in advance...

Closing due to inactivity - hope you were able to locate your issue! Cheers