pmndrs / gltfjsx

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

v6.2.12 - Cannot read properties of undefined (reading 'length') #242

Open ruan-azevedo opened 8 months ago

ruan-azevedo commented 8 months ago

I'm learning R3F and when I tried to convert a .glb model from readyplayer.me using this tool, I'm getting this infinite loop on the browser:

Screenshot 2024-01-23 at 7 50 47 PM

Reproduction repo

https://github.com/RuanAzevedo/gltfjsx-bug-repro

Checkout the file https://github.com/RuanAzevedo/gltfjsx-bug-repro/blob/main/src/components/Experience.jsx for the following code:

// this one works fines
<primitive object={scene} />
// this one doesn't work
{/* <Avatar /> */}

Versions before 6.2.12 work fine (tested from 6.2.11 to 6.2.3). I'm pretty new with this 3D stuff, but with some directions maybe I can investigate and send a PR.

ruan-azevedo commented 8 months ago

Related issues https://github.com/pmndrs/gltfjsx/issues/223 https://github.com/pmndrs/gltfjsx/issues/178

ebowwa commented 4 months ago

Direct CLI Solution

{package_manager} install gltfjsx@6.2.12

{package_manager} install read-pkg-up

{package_manager} gltfjsx -t {model_path}