Skip to content

spool / TransformTrack

Class: TransformTrack

Defined in: plugins/clip/track.ts:71

Animates a display model's transform - any combination of move (translate), scale, rotateTo (set orientation), and spin (continuous rotation about an axis). A spin makes the track periodic (baked frames); otherwise it tweens natively unless .bake() is forced.

Implements

Constructors

Constructor

new TransformTrack(target): TransformTrack

Defined in: plugins/clip/track.ts:79

Parameters

target

ModelTarget

Returns

TransformTrack

Accessors

mode

Get Signature

get mode(): TrackMode

Defined in: plugins/clip/track.ts:121

Returns

TrackMode

Implementation of

Track.mode

Methods

bake()

bake(): this

Defined in: plugins/clip/track.ts:102

Force per-tick baked frames even for an otherwise-tweenable track.

Returns

this


emitFrame()

emitFrame(ctx, f, period, duration): void

Defined in: plugins/clip/track.ts:139

Frame mode: emit the commands for frame index f.

Parameters

ctx

FunctionContext

f

number

period

number

duration

number

Returns

void

Implementation of

Track.emitFrame


emitSmooth()

emitSmooth(ctx, duration, reverse): void

Defined in: plugins/clip/track.ts:168

Smooth mode: emit the one-shot native tween toward the end pose (or base if reverse).

Parameters

ctx

FunctionContext

duration

number

reverse

boolean

Returns

void

Implementation of

Track.emitSmooth


empty()

empty(): boolean

Defined in: plugins/clip/track.ts:113

A track with nothing to animate (an untouched primary model track); skipped.

Returns

boolean

Implementation of

Track.empty


length()

length(): number

Defined in: plugins/clip/track.ts:126

Highest absolute keyframe tick this track defines (0 if it spans the clip duration).

Returns

number

Implementation of

Track.length


move()

move(delta): this

Defined in: plugins/clip/track.ts:81

Parameters

delta

Vec3

Returns

this


period()

period(duration): number

Defined in: plugins/clip/track.ts:134

Distinct frame count for frame mode (the clip cycles frame_(t % period)).

Parameters

duration

number

Returns

number

Implementation of

Track.period


revolution()

revolution(): number | undefined

Defined in: plugins/clip/track.ts:130

If this track is a pure periodic spin, its revolution frame count (for snap).

Returns

number | undefined

Implementation of

Track.revolution


rotateTo()

rotateTo(q): this

Defined in: plugins/clip/track.ts:89

Parameters

q

Quat

Returns

this


scale()

scale(to): this

Defined in: plugins/clip/track.ts:85

Parameters

to

Vec3

Returns

this


smooth()

smooth(): this

Defined in: plugins/clip/track.ts:107

Force the native-interpolation path (rejected if the track spins).

Returns

this


spin()

spin(axis, degPerTick): this

Defined in: plugins/clip/track.ts:93

Parameters

axis

Axis

degPerTick

number

Returns

this

Released under the MIT License · Credits