Skip to content

Error when I try to use --transform #282

@alanmun

Description

@alanmun

npx gltfjsx --transform .\frontend\assets\models\bedroom.glb
TypeError: Cannot read properties of null (reading 'createAccessor')
at compactPrimitive (file:///C:/Users/red/Repositories/horragame/node_modules/@gltf-transform/functions/dist/functions.modern.js:2408:31)
at _joinLevel (file:///C:/Users/red/Repositories/horragame/node_modules/@gltf-transform/functions/dist/functions.modern.js:4104:7)
at join (file:///C:/Users/red/Repositories/horragame/node_modules/@gltf-transform/functions/dist/functions.modern.js:4066:7)
at Document.transform (file:///C:/Users/red/Repositories/horragame/node_modules/gltfjsx/node_modules/@gltf-transform/core/dist/index.modern.js:4005:13)
at async transform (file:///C:/Users/red/Repositories/horragame/node_modules/gltfjsx/src/utils/transform.js:114:3)
at async run (file:///C:/Users/red/Repositories/horragame/node_modules/gltfjsx/src/gltfjsx.js:54:9)

Using without --transform works fine, but I'd really like to compress my models so they load faster while developing.

I am using:
"@react-three/drei": "^9.120.4",
"@react-three/fiber": "^8.17.10",
"@react-three/postprocessing": "^2.16.3",
"react": "18",
"react-dom": "18",
"three": "^0.171.0",
"gltfjsx": "^6.5.3",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions