How to find bones, armature or skeleton in .GLB in three.js code?

Hello everyone,

I exported a GLB file from Blender and imported it into Three.js using GLTFLoader. However, I can’t find the armature or skeleton in the scene graph. I was expecting a rigged model with bones, but I only see the mesh.

Things I checked so far:

  • In Blender, my model is rigged and has an armature.
  • I made sure to select the mesh and the armature before exporting.
  • I enabled “Include > Armature” and “Animations” in the GLB export settings.
  • I applied all transforms before exporting (Ctrl + A > Apply All Transforms).

Despite this, when I inspect the GLB file in Three.js, I don’t see any Armature or Skeleton. I only see the mesh.

Did I miss something during the export, or do I need to do something specific in Three.js to access the armature?

Any advice would be greatly appreciated!

Thank you!

let bones = gltf.scene.getObjectsByProperty('isBone',true)

let skinnedMeshes = gltf.scene.getObjectsByProperty('isSkinnedMesh',true)
``` maybe.
2 Likes

Note that in three.js, a Skeleton is not part of the scene graph, it’s a resource attached to a SkinnedMesh:

const skeleton = mesh.skeleton;

console.log(skeleton.bones);
2 Likes