pygfx.objects.Skeleton

class pygfx.objects.Skeleton(bones: List[Bone], bone_inverses=None)

Bases: object

A skeleton.

A skeleton is a collection of bones that are used to animate a SkinnedMesh.

Parameters:
  • bones (List[Bone]) – The list of bones. Note that a copy will be made, so you can modify the original list without effecting this one.

  • bone_inverses (List[np.ndarray] | None) – A list of matrix4x4 that represent the inverse of the world matrix of the individual bones. If not provided, they will be auto calculated.

property bones

The array of bones.

property bone_inverses

An array of matrix4x4 that represent the inverse of the world matrix of the individual bones.

calculate_inverses()

Generate the bone_inverses array if not provided in the constructor.

pose()

Reset the skeleton to the binding-time pose.

update()

Update the bone matrices buffer.

Examples

Skinned Mesh

Skinned Mesh

Detached Bind Mode

Detached Bind Mode