CinematicPreview beta
Class of @v12-engine/editor
export declare class CinematicPreviewThe preview of a cinematic in the editor: see the top of this file
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the CinematicPreview class.
Members
catchingUp
get catchingUp(): boolean;Whether the world is behind the playhead and catching up to it (catchUp): a scrub, an edit, a world made anew
cut
get cut(): Playing['cut'] | undefined;The cut playing, for a test or a panel of the game's: its clock, its lanes' state
dialog
readonly dialog: DialogQueue;The lines the preview says, drawn by the HUD's dialog box over the editor's view
director
readonly director: CinematicPlayer;The director the preview plays through, as the game's client has one (client.cinematics)
dispose
dispose(): void;Takes it off (stop) for good, and its screen's pass with it
frame
frame(dt: number): boolean;A frame of the editor: the cinematic moved on by dt while it plays (stopping a hair before its end, unless it loops), and the screen's pass with it. Gives back whether it reached its end and stopped
held
get held(): boolean;Whether a waiting line stands its clock still now (moved on by Enter, next)
hud
readonly hud: HudClient;What the HUD's dialog box is handed: the little of a client it reads (ui, dialog, its key, moving a line on)
input
input(input: CutInput): void;A key or a click for the preview's waits, as the player's would be in the game
loop
get loop(): CutLoop | null;The stretch played over and over (CutLoop), or none: it plays on to the end and stops there
mount
mount(element: HTMLElement): () => void;Draws the preview's dialog box (the HUD's own, in the game's look, as Play here draws the game) into an element over the view: the scene's element, as the Cinematic panel puts it. Gives back what takes it out
next
next(): boolean;Moves the line on screen on, as Enter does in the game. Whether there was one
pause
pause(): void;Holds it where it is: the picture stands, the view is the editor's to fly again
play
play(): void;Plays from where it is (from the start of the loop, or of the cinematic, where it stands at the end)
playing
static playing(): boolean;Whether a cinematic plays in the editor's view now, as a signal: what the empty map's card gives way to
portraits
readonly portraits: Portraits;A speaker's face in the box, live on the editor's models or still (C2)
rate
get rate(): number;How fast it plays against the editor's time: 2 is twice as fast
release
release(element?: HTMLElement | null, options?: {
keep?: boolean;
}): void;Lets it play on to its end with no panel: its panel closed (or went behind another's tab) while it played, and a cinematic that runs runs on, as in the game. It moves on with the editor's frames (editor.screen.onFrame), draws its dialog box into element (the scene's), and is taken off for good (dispose) at its end, as another preview shows, or as the editor plays the map. One not playing is taken off at once
running
running(): boolean;Whether it plays now (the transport's ▶), as a signal
screen
readonly screen: ScreenPass;The screen's pass over the editor's picture: the bars, a fade, a tint, a blur, as in the game
seek
seek(at: number): void;Moves the preview to a time: the camera, the screen, the lines and the units are what the cinematic has then
setLoop
setLoop(loop: CutLoop | null): void;Sets the stretch played over and over (loop); none, or one that ends before it starts, plays on to the end
setRate
setRate(rate: number): void;Sets how fast it plays (rate)
settled
settled(): Promise<void>;Settles once the world has caught up with the playhead (at once where it has): what a test waits on after a seek or a show. Where no frame comes (a test), the catching up is started here
show
show(def: CinematicDef, at: number, params?: Record<string, unknown>): void;Shows a cinematic at a time: played from there anew, paused unless the transport plays. What the panel calls as it opens one, and after every edit
stage
readonly stage: Stage;What the cinematic is played on: the editor, as far as cinematics go
stop
stop(): void;Takes the preview off the editor: nothing plays, the screen and the dialog box are clear, and the view keeps where it is but goes back to the editor's lens and roll. What the panel does as it closes, or shows no cinematic
taken
static taken(): void;Takes off the preview released by a panel, if one plays: another is about to show
time
get time(): number;Seconds into the cinematic the preview is at: the moment the world catches up to, while it does
transitions
readonly transitions: TransitionPass;The transitions between shots, as in the game: armed while the preview plays (a scrub shows none)
ui
readonly ui: Ui;The HUD's state the dialog box reads: the line shown, the dialog's look, the picture's box between the bars
world
readonly world: PreviewWorld;The world the preview runs (CN3): the map's game, with no screen of its own, drawn on the editor's stage