expo-three icon indicating copy to clipboard operation
expo-three copied to clipboard

Cannot load texture from URI from phone device

Open TeamBaconn opened this issue 2 years ago • 1 comments

Hi, i'm using expo three in my react-native project. I can not load texture from URI using expo three TextureLoader and apply it onto my object. This method only work on web, not my iphone. Here is my snack: https://snack.expo.dev/@baconn00/three This is on the snack image This is what my phone looks like image I would be appreciated for any help, thankyou

TeamBaconn avatar Nov 07 '21 07:11 TeamBaconn

With Expo SDK 45, I bisected versions of three and found that TextureLoader.load(url) works fine with three <= 0.135 and does not work with three >= 0.136.

Between 0.135 and 0.136, there were changes to how GL textures are uploaded in src/renderers/webgl/WebGLTextures.js. I suspect these changes made three's texture uploads no longer work with latest versions of the Expo SDK.

My working versions:

    "expo": "^45.0.0",
    "expo-gl": "~11.3.0",
    "expo-gl-cpp": "~11.3.0",
    "expo-three": "~6.0.1",
    "three": "^0.135.0",

Here is an Expo Snack that reproduces the issue on Expo SDK 45: https://snack.expo.dev/@maas38288/web-texture-issue If you open the app on Android, then go into package.json and change the version of "three" from 0.135.0 to 0.136.0, the texture disappears and the cube renders as black.

danmaas avatar Jun 19 '22 03:06 danmaas