Skip to content

CinematicDef beta ​

Interface of @v12-engine/client

ts
export interface CinematicDef

A cinematic as data: lanes of keys and clips on a clock, markers at named moments, what it expects to be handed (params) and what it talks of by name (refs), and how it likes to be played (play: held, skippable, the letterbox...). length is seconds; left out, it ends with its last item (cinematicLength)

Members ​

id ​

ts
id: string;

The cinematic's id among the game's cinematics, also its file's name in cinematics/

lanes ​

ts
lanes: LaneData[];

Its lanes, each a kind with its keys or clips

length ​

ts
length?: number;

Seconds it lasts; it ends with its last item when left out

loop ​

ts
loop?: {
        from?: number;
        to?: number;
    };

Played over and over (D3): from from (0) to to (its length) and back, until the script ends the loop (cut.endLoop), skips it or ends it (cut.end). A menu's fly-over behind its buttons

markers ​

ts
markers: Marker[];

Its named moments

name ​

ts
name?: string;

What the editor and lists call it; the id when left out

params ​

ts
params?: ParamSchema;

What it expects to be handed when played, by name

play ​

ts
play?: PlayOptions;

How it likes to be played: held, skippable, the letterbox and the rest

preload ​

ts
preload?: {
        types?: string[];
        models?: string[];
        sounds?: string[];
    };

What to load ahead besides what its lanes name (D3): the models of unit types (types) a script places or spawns, models by their path (models: a prop's), and sounds. client.cinematics.preload and cut.preload load it, and the cinematics it includes

refs ​

ts
refs?: Record<string, RefDef>;

What it talks of by name (units, regions, cameras, code), resolved as asked for