Skip to content
Shapemetry

@huukhanhnguyen/types / objects/skeleton

objects/skeleton

Bone

Bone = { head: Point; roll: number; tail: Point; }

One bone's GEOMETRY: a SEGMENT from head to tail, twisted by roll about its own axis. Blender's form (DNA_armature_types.h head[3] / tail[3] / roll). Length is |tail − head|.

head / tail / roll are the REST pose, relative to the parent.

head: Point

roll

roll: number

tail

tail: Point


BoneEntity

BoneEntity = Bone & { attributes?: Record<string, unknown> | null; name: string; parent?: string; positionTrack?: string; rotationTrack?: string; scaleTrack?: string; }

One bone as an entry of a SkeletonData: the segment plus what the DOCUMENT says about it — its identity, its place in the hierarchy, the animated channels it plays, and its opaque claims.

parent rides here and not on Bone because it names another bone's name: a reference cannot live on a tier that has no identity to reference.

positionTrack / rotationTrack / scaleTrack are optional Track.key references — this bone's OWN animated channel. Consumer-holds-the- reference.


SkeletonData

SkeletonData = { bones: BoneEntity[]; }

Object-tier skeleton datablock — the bone hierarchy itself. One object IS one skeleton; two skeletons are two objects. bones order is the skin index space — not an implementation detail. Authored as that order.

bones

bones: BoneEntity[]


SkeletonInstance

SkeletonInstance = BaseInstance & { }

A skeleton has no surfaces; material is rejected on this kind.


SkeletonObject

SkeletonObject = BaseObject & { data: SkeletonData; instances: SkeletonInstance[]; type: "skeleton"; }

An object whose data is one bone hierarchy and nothing else.

The skeleton's identity is this object's KEY — there is no name inside the data. faceSkeleton names that key; lookup has to fail loud when the key is not a skeleton.

Last updated: 📖 2 min readEdit on GitHub