SkinnedMesh
A mesh with skeletal animation support. Requires a Skeleton and skinIndex/skinWeight buffer attributes in the geometry.
Extends Mesh.
Typically created by loaders (e.g. GLTFLoader) rather than manually.
Constructor
const mesh = new SkinnedMesh(geometry?, material?)
Properties
isSkinnedMesh— Type flag (true)bindMatrix— Matrix4, base transform for bone bindingbindMatrixInverse— Matrix4, inverse of bind matrixboundingBox— Box3 ornull(compute manually viacomputeBoundingBox())boundingSphere— Sphere ornull(computed on demand)skeleton— The bound Skeleton (set viabind())
Methods
bind(skeleton, bindMatrix?)— Bind a skeleton. If no bindMatrix, uses current world matrix.pose()— Reset to rest posenormalizeSkinWeights()— Normalize skin weights so they sum to 1computeBoundingBox()— Compute AABB accounting for skinningcomputeBoundingSphere()— Compute bounding sphere accounting for skinningapplyBoneTransform(index, target)— Apply bone transform to a vertex positiongetVertexPosition(index, target)— Get skinned vertex positionraycast(raycaster, intersects)— Ray intersection (uses skinned bounding volumes)copy(source, recursive?)— Copy skinned mesh data