Hello, I am struggling to an error while using the gltfjsx command-line tool to turn an animated model into a TSX component.
My model is rigged using the rigify addon in blender like the following:
Then I exported my model to the glTF 2.0 format.
So I try to use the gltfjsx command-line tool to implement into my code but I got this error as a result:
prune: Removed types… Accessor (16)
prune: Removed types… Material (10)
prune: Removed types… Accessor (158)
instance: Instancing is not currently supported for animated models.
prune: No unused properties found.
prune: No unused properties found.
prune: No unused properties found.
TypeError: Cannot read properties of null (reading ‘array’)
at file:///C:/Users/billy/AppData/Local/npm-cache/_npx/16b3f312213fced0/node_modules/gltfjsx/src/bin/GLTFLoader.js:2425:40
at async Promise.all (index 0)
at async Promise.all (index 1)
I don’t know what I did wrong in my model maybe using rigify for my model is not the best option to export it on the web.
Any help would be greatly appreciated.
Thank you in advance.
yes, that’s a bug. we are using a very old version of GLTFLoader in order to make it run under node. it may have fallen behind. a gltf/glb would help to fix it.
i added a fix though i don’t know why it crashed, gltf-data outputAccessor was null whatever that meant. your model though seems very flawed, it’s a few simple shapes but comes in at over 50mb. even gltfjsx/gltf-transform couldn’t help it. when you model in blender towards the web you have to watch out for vertex count, make surfaces as simple as possible. a model on the web shouldn’t be over 2-3mb. your model in particular, as simple as it is, should be 10kb.