Skip to content

CutClock beta ​

Class of @v12-engine/client

ts
export declare class CutClock

The clock a cinematic runs on: see the top of this file

Members ​

advance ​

ts
advance(dt: number): number;

Moves the clock on by dt seconds of the screen, at its rate; nothing while paused. Gives back the seconds of its own it moved, for the timers that count them. Reaching the end of a loop is a seek to its start

held ​

ts
get held(): boolean;

Something stands it still (hold)

hold ​

ts
hold(): () => void;

Stands the clock still until what it gives back is called: a line of dialog that waits to be moved on, so the picture stands on it. Not a pause (no pause hook, the transport's state as it is); holds add up, and the clock goes on once every one is let go

loop ​

ts
loop: CutLoop | null;

Goes back to from as it reaches to: the editor playing a stretch over and over

onPause ​

ts
onPause(listener: (paused: boolean) => void): () => void;

Hears every pause and resume

onRate ​

ts
onRate(listener: (rate: number) => void): () => void;

Hears every change of rate

onSeek ​

ts
onSeek(listener: (time: number, from: number) => void): () => void;

Hears every seek, with the time jumped to and the time jumped from. Gives back what stops hearing

pause ​

ts
pause(): void;

Stops the clock and tells those listening that it is paused; nothing when it already is

paused ​

ts
paused: boolean;

Held: advance moves nothing until resume

rate ​

ts
rate: number;

How fast it goes against the screen: 1 is as fast; 0.5 slow motion; 0 holds (as paused does)

resume ​

ts
resume(): void;

Starts the clock again and tells those listening; nothing when it is not paused

seek ​

ts
seek(time: number): void;

Jumps to a time: the lanes are played again from there (what listens, onSeek, sees to that)

setRate ​

ts
setRate(rate: number): void;

Sets how fast it goes (see rate), and tells what listens

time ​

ts
time: number;

Seconds since the cinematic began, on this clock