gltfjsx icon indicating copy to clipboard operation
gltfjsx copied to clipboard

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

Open RuanAzevedo opened this issue 5 months ago • 2 comments

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.

RuanAzevedo avatar Jan 24 '24 01:01 RuanAzevedo

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

RuanAzevedo avatar Jan 24 '24 01:01 RuanAzevedo

Direct CLI Solution

{package_manager} install [email protected]

{package_manager} install read-pkg-up

{package_manager} gltfjsx -t {model_path}

ebowwa avatar May 06 '24 18:05 ebowwa