pmndrs / gltfjsx

🎮 Turns GLTFs into JSX components
https://gltf.pmnd.rs
MIT License
4.7k stars 309 forks source link

react-native not supported for glb #225

Open qalqi opened 1 year ago

qalqi commented 1 year ago

Started a new expo project Downloaded https://models.readyplayer.me/646d9dcdc8a5f5bddbfac913.glb?morphTargets=Oculus%20Visemes

gltfjsx ./src/models/avatar/models/646d9dcdc8a5f5bddbfac913.glb --transform --types --debug

The generated 646d9dcdc8a5f5bddbfac913.tsx giving the following error

 ERROR  THREE.GLTFLoader: Couldn't load texture {"_h": 1, "_i": 2, "_j": [Error: Creating blobs from 'ArrayBuffer' and 'ArrayBufferView' are not supported], "_k": null}
qalqi commented 1 year ago

Tried without textures by downloading https://models.readyplayer.me/646d9dcdc8a5f5bddbfac913.glb?morphTargets=Oculus%20Visemes&textureChannels=none

gltfjsx ./src/models/avatar/models/646d9dcdc8a5f5bddbfac913.glb --transform --types --debug

The generated 646d9dcdc8a5f5bddbfac913.tsx giving the following error

Possible Unhandled Promise Rejection (id: 8): ReferenceError: Property 'Worker' doesn't exist ReferenceError: Property 'Worker' doesn't exist at anonymous

qalqi commented 1 year ago

Here is sandbox repo for reference - https://github.com/qalqi/sandboxthree

qalqi commented 1 year ago

Here is the reference repo working in web - https://github.com/wass08/r3f-lipsync-tutorial https://r3f-lipsync-tutorial.vercel.app/