Skip to content

CinematicHost beta ​

Interface of @v12-engine/client

ts
export interface CinematicHost

What the director asks of the client: the stage, how to make way for a cinematic, and what to load ahead. The editor's preview is another host: its camera, its scene, no game

Members ​

camera ​

ts
readonly camera: {
        pose(): CameraPose;
        setPose(pose: CameraPose): void;
        easeTo(pose: CameraPose): void;
    };

The camera: its pose read and set at once, and eased to a pose

entry ​

ts
entry(id: string): CinematicEntry | undefined;

One of the view's cinematics by id

frame ​

ts
frame(info: CinematicInfo | null): void;

Puts the letterbox and the skip hint on the screen, or takes them off (null)

held ​

ts
held(): boolean;

Whether something holds every cinematic: the pause menu open

hideHud ​

ts
hideHud(kept?: readonly HudWidget[]): () => void;

Hides the HUD but the parts named. What it returns shows it again

hold ​

ts
hold(): () => void;

Holds the game where it runs in this page. What it returns lets it go

lockInput ​

ts
lockInput(): () => void;

Takes the player's hands off. What it returns gives them back

log ​

ts
readonly log: Logger;

The logger the director says problems in

preload ​

ts
preload(def: CinematicDef): Promise<void>;

Loads what a cinematic will need: the voices and sounds it names

stage ​

ts
readonly stage: Stage;

The stage the cinematic plays on: the camera, the units, the screen and the sound