SkeletonJointIndexMap

SkeletonJointIndexMap

This class maps skeleton joint paths to skeleton indices. It is constructed with a skeleton and
returns the mapping from joint paths to skeleton indices via the getJointIndex(jointPath) function.

It is used by AnimationClipInstance to map JointChannel joint paths to skeleton indices for a skeleton.

Constructor

new SkeletonJointIndexMap(skeleton)

Parameters:
Name Type Description
skeleton Skeleton

reference skeleton.

Methods

_getJointPath(joint, skeleton)

Returns the joint path of the given joint in the given skeleton.

Parameters:
Name Type Description
joint Joint

joint for which to compute joint path.

skeleton Skeleton

Skeleton

getJointIndex(jointPath) → (nullable) {number}

Recursive function to find the joint index matched to a given joint path. This function matches the first skeleton path
(ordered by joint index) that ends with the given jointPath. If no such match is found, the search is continued by chopping
off one path part from the given joint path and repeating.

Parameters:
Name Type Description
jointPath string

joint path.