Documentation / @imvu/cal3d / Track
Class: Track
Defined in: packages/cal3d/src/Animation.ts:42
The keyframes animating one bone.
Constructors
Constructor
new Track(init): Track;Defined in: packages/cal3d/src/Animation.ts:53
Parameters
| Parameter | Type |
|---|---|
init | TrackInit |
Returns
Track
Properties
boneId
boneId: number;Defined in: packages/cal3d/src/Animation.ts:44
Index of the animated bone in the skeleton.
highRangeRequired
highRangeRequired: boolean;Defined in: packages/cal3d/src/Animation.ts:51
Whether compressed translations need the ±2²³ range rather than ±128.
keyframes
readonly keyframes: Keyframe[];Defined in: packages/cal3d/src/Animation.ts:45
translationIsDynamic
translationIsDynamic: boolean;Defined in: packages/cal3d/src/Animation.ts:49
Whether the translation changes between keyframes (otherwise only the first one stores it).
translationRequired
translationRequired: boolean;Defined in: packages/cal3d/src/Animation.ts:47
Whether keyframes carry translations (otherwise only the rotation is animated).
Methods
getBone()
getBone(skeleton): Bone | undefined;Defined in: packages/cal3d/src/Animation.ts:61
Parameters
| Parameter | Type |
|---|---|
skeleton | Skeleton |
Returns
Bone | undefined
sample()
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
| Parameter | Type |
|---|---|
time | number |
Returns
object
rotation
rotation: Quaternion;translation
translation: Vector3 | null;