Skip to content

Documentation / @imvu/cal3d / Track

Class: Track ​

Defined in: packages/cal3d/src/Animation.ts:42

The keyframes animating one bone.

Constructors ​

Constructor ​

ts
new Track(init): Track;

Defined in: packages/cal3d/src/Animation.ts:53

Parameters ​

ParameterType
initTrackInit

Returns ​

Track

Properties ​

boneId ​

ts
boneId: number;

Defined in: packages/cal3d/src/Animation.ts:44

Index of the animated bone in the skeleton.


highRangeRequired ​

ts
highRangeRequired: boolean;

Defined in: packages/cal3d/src/Animation.ts:51

Whether compressed translations need the ±2²³ range rather than ±128.


keyframes ​

ts
readonly keyframes: Keyframe[];

Defined in: packages/cal3d/src/Animation.ts:45


translationIsDynamic ​

ts
translationIsDynamic: boolean;

Defined in: packages/cal3d/src/Animation.ts:49

Whether the translation changes between keyframes (otherwise only the first one stores it).


translationRequired ​

ts
translationRequired: boolean;

Defined in: packages/cal3d/src/Animation.ts:47

Whether keyframes carry translations (otherwise only the rotation is animated).

Methods ​

getBone() ​

ts
getBone(skeleton): Bone | undefined;

Defined in: packages/cal3d/src/Animation.ts:61

Parameters ​

ParameterType
skeletonSkeleton

Returns ​

Bone | undefined


sample() ​

ts
sample(time): object;

Defined in: packages/cal3d/src/Animation.ts:69

The pose at time, interpolated between the surrounding keyframes (linear translation, spherical rotation) and clamped to the first/last keyframe.

Parameters ​

ParameterType
timenumber

Returns ​

object

rotation ​
ts
rotation: Quaternion;
translation ​
ts
translation: Vector3 | null;

Released under the MIT License.