-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GLTF Loader is not working in mobile version #184
Comments
Facing the same issue with the |
@hkirat do you know, how to get OrbitControls in mobile application ? |
same issue, i see nothing on mobile on android, but loads on web. |
I think there is a PR for this #165 but has gotten stale. |
@hkirat @EvanBacon seems like there are multiple issues with gltf, when trying to load via a URL directly, nothing happens. Spent a few hours trying to get a gltf file loading but no luck. Listed on the threejs website https://threejs.org/docs/#manual/en/introduction/Loading-3D-models it states gltf/glb is the recommended format. I can help setup some test to showcase the errors that are happening if needed. |
I couldn't load any formats of 3d models. So if it is possible to load some other formats also will be helpful to me @EvanBacon @seand88 @hkirat |
@krjk333 i was able to load 3d models with obj format successfully. Unfortunately I can't use it with expo, but I can still achieve what I was going after atleast. |
@seand88 Thank you so much for your comment. How to load 3d models with obj format in expo-three for mobile version. Can you please share the sample code please. I have spent some days for this. But still I couldn't find solution. So if you help me. That will be very good for me. |
I was able to load GLTF files on both iOS and WEB. Here is an example repository EDIT: I was able to run the loader on all 3 platforms by changing loader path from asset.localUri to asset.uri: |
Thanks for the example @miazga. |
Thanks to @miazga I am now able to load gltf models. These are the only types of model that worked. The model also needed to have 0 validation errors which I checked using https://sandbox.babylonjs.com/. |
i saw the base-64 suggestion above and used the same process to get around an error with the MTLLoader.load returning isTrusted:false as well.
|
@emileswain thanks for sharing, so did it show the model on android with material? can you please share the repo on Github? |
Whoever struggling with |
I tried to load a .glb file using GLTFLoader. It is working in Web version. But the object is not visible in mobile version. I couldn't find any error messages too. I am using following script.
The text was updated successfully, but these errors were encountered: