-
Notifications
You must be signed in to change notification settings - Fork 90
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
createTextureAsync from remote dynamic image file #10
Comments
@ericmorgan1 just pushed You can now call: const someRemoteUrl = "https://www.biography.com/.image/t_share/MTE5NDg0MDU0ODczNDc0NTc1/ben-affleck-9176967-2-402.jpg"
const texture = await ExpoTHREE.loadAsync(someRemoteUrl) |
@EvanBacon Thank you for the fast turnaround! Works great! : ) |
@EvanBacon this is still not working. I really don't know what's going on, since the error messages point to NativeModules. I don't know if it helps, but here are my package.json dependencies:
Thanks for your support. |
@softnodelabs I really cannot reproduce your error. Could you please reproduce the error in a snack? |
@EvanBacon I copied your sample code to this snack: I get only a white screen. My testing device: Samsung Galaxy S6 - Android 7.0 Edit: I updated the snack code. With this code, I can show a plane with a color but when I try to load a texture on it, I get a promise rejection with nothing showing up. [Unhandled promise rejection: Error: unexpected url: file:///data/user/0/host.exp.exponent/cache/ExperienceData/%2540softnodelabs%252Fsuabreja/ben-affleck-9176967-2-402.jpg] It seems like it downloads the image but can't use it. Thanks. |
@softnodelabs this is an error created on android when you create an |
@softnodelabs also good find 🔥🔥🔥 |
@EvanBacon I'm happy I can help finding issues. I got everything working. I replicated some of your code in a test project so I could understand how the downloading process and asset creation works. From there I could create a class that works on Android. It needs testing on iOS though. I don't know if it's needed but as soon as I have the time I can share my code on a snack project. Thank you! |
I have the same error that @softnodelabs had, but I'm on ios. Even after removing all references from the Expo Filesystem in my code, my app still tries to load the old referenced files and gives me an error. @EvanBacon where do I set the Expo.Asset.downloaded flag? |
@EvanBacon , How to load the 3d object like this. I tried with so many methods to load an object. All gets failed. Please anyone help me to load 3d object in .obj, .gltf, or .glb any of one format in react native. |
Images can be loaded as a material using code like the following:
How can we create a material from a remote file determined at runtime (where
require()
is not available) and we cannot create anExpo.Asset
?Here are some attempts I've made, with no luck:
The text was updated successfully, but these errors were encountered: