-
Notifications
You must be signed in to change notification settings - Fork 91
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
Textures based on bundled images doesn't appears in standalone app #54
Comments
To get the asset loading in three.js you need a |
@EvanBacon Thanks! I'll try to have deal with Expo.Asset.fromModule().localUri, and to research code of your project. |
@EvanBacon Well, i tried to use approach from Pillar Valley - with caching images as files through expo-asset-utils (but i don't understand why do we need to cache bundled images) and creating textures through ExpoTHREE.loadAsync, but it didn't resolve the issue. Then I check Pillal Valley standalone build and... it have the same issue!
P.S. |
Hi @EvanBacon, I'm wondering if this issue can be addressed as it prevents expo-three from loading texture when building an Android APK. |
Steps to Reproduce:
On this step local project and standalone app works properly - there is background texture in both case
to app.json.
And on this step local project worked properly, but in app installed from builded apk there is no background image, just black (with 2.. expo-three versions) or white (with 3.0.0-alpha.2) screen. There is bg.png in extracted by apktool folder, and i can use it for example for RN Image like this
<Image source={Asset.fromModule(Files.sprites.bg)} style={{width: '100%', height: '100%'}}/>
, and it appears properly in standalone app.I tried to remove Asset.fromModule().downloadAsync() since we have bundled file, i tried to create texture by Three.Texture constructor and THREE.TextureLoader().load passing to them, Expo.Asset, require(), or just string with path, and i tried to use different paths like "assets/sprites/bg.png", "./assets/sprites/bg.png", "/assets/sprites/bg.png", and so on.
There is another game I develop, it use different than flappy asset system, and also tried different variants to get assets and create textures, but it have exactly the same issue.
I tested it on Android 5.0 device.
The text was updated successfully, but these errors were encountered: