CutDefs beta
Class of @v12-engine/client
export declare class CutDefsWhat a cut plays of cinematics as data (cut.defs): the defs playing on the cut's clock (play), their markers, sections, cues and loops, and playing them again from a time when the clock is seeked. The cut's play, section, seekTo, cue and the rest are this, under the names the docs give them
Members
constructor
constructor(cut: Cut,
known: {
names: Record<string, number>;
refs: Map<string, RefDef>;
});Constructs a new instance of the CutDefs class
at
at(marker: string): number | undefined;The time of the cut a marker of a def played is at, or nothing for a name no def played has
cue
cue(name: string, params?: Record<string, unknown>): void;Cues the cinematic: what waits for the cue goes on (untilCue), and its hooks run (cue:<name>). A cue nothing waits for is kept for the next wait of its name
end
end(): void;Ends the defs playing as if they had reached their end: a branch that goes to the end
letGo
letGo(replay: (from: number) => void): void;A def let go of: a seek no longer plays it
over
over(ending: number, replay: (from: number) => void): void;A def over: a seek no longer plays it, and end no longer goes to its end
placed
placed(def: CinematicDef, began: number, ending: number, replay: (from: number) => void): void;A def begun at began on the cut's clock, ending at ending: its markers and sections, and its replay
play
play(cinematic: CinematicDef | string, options?: {
units?: Record<string, number>;
at?: number;
}): CutStep;Plays a cinematic as data (CinematicDef, or one of the game's by its id) on the cut's time, and settles when it is over (see Cut.play)
replay
replay(time: number): void;Plays every def playing again from the cut's time: what a seek of the clock does
section
section(name: string): Promise<void>;Plays a section of the defs playing (D3): from its marker (kind: 'section') to the next section's, or the end; settles when the clock gets there. The defs play on after it unless the script does otherwise
seekTo
seekTo(marker: string): boolean;Jumps to a marker of a def played (see Cut.seek). Whether there is one by that name
unlooped
unlooped: boolean;Whether the loops of the defs playing are ended (endLoop): they play on to their ends
untilCue
untilCue(name: string, seconds?: number): Promise<void>;Waits for a cue, or seconds at most: one heard before that nothing waited for ends it at once
untilMarker
untilMarker(name: string): Promise<void>;Waits until the time reaches a marker of a def playing (its hook marker:<name>): at once for one already passed. A def played after the wait began counts: its marker is heard when it is reached