pmndrs / gltfjsx

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

Running gltfjsx with a glb file with the `-i` or `-I` flag throws an error #221

Closed rogersanick closed 10 months ago

rogersanick commented 10 months ago

Hey there, I'm using gltfjsx@6.2.11 install globally on my machine. The issue only occurs where the -i or -I flag is included.

I have previously used gltfjsx in my pipeline for all my 3d assets. I'm doing a V2 of all the assets and hoping to instance all of the generated components. Any help would be greatly appreciated!

npx gltfjsx accosisting_squeemer_v2.glb -i -t false prune: Removed types... Accessor (6) prune: Removed types... Accessor (62) instance: No meshes with ≥5 parent nodes were found. prune: No unused properties found. prune: Removed types... Mesh (1), Node (1), Primitive (8), Accessor (6) prune: No unused properties found. prune: No unused properties found. TypeError: Cannot read properties of null (reading 'name') at Mesh.updateMorphTargets (file:///Users/nrog/.nvm/versions/node/v18.17.1/lib/node_modules/gltfjsx/node_modules/three/build/three.module.js:11391:39) at new Mesh (file:///Users/nrog/.nvm/versions/node/v18.17.1/lib/node_modules/gltfjsx/node_modules/three/build/three.module.js:11346:8) at file:///Users/nrog/.nvm/versions/node/v18.17.1/lib/node_modules/gltfjsx/src/bin/GLTFLoader.js:2220:15 at async Promise.all (index 0) at async Promise.all (index 1) at async Promise.all (index 0) at async Promise.all (index 0)

rogersanick commented 10 months ago

This is the glb file that's causing the issue. accosisting_squeemer_v2.glb.zip

rogersanick commented 10 months ago

This issue was fixed in 6.2.12

GGAlanSmithee commented 6 months ago

@rogersanick I am still getting this error with the model you supplied, on version 6.2.15. I am using Node v20.5.0, npm 10.2.1, and WSL. Is there anything I need to do in addition to update gltfjsx to get this working?