Skip to content

CinematicSceneOptions beta ​

Interface of @v12-engine/client/app

ts
export interface CinematicSceneOptions extends Omit<GameSource, 'game' | 'map' | 'player' | 'debug' | 'environment' | 'editing' | 'generated'>

What a cinematic scene is made with (cinematicScene): the map and the rules as gameScene takes them, the cinematic, how it is played, and where the scene goes after

Members ​

assets ​

ts
assets?: {
        base?: string;
    } | Assets;

Where the game's files are

cinematic ​

ts
cinematic: string | CinematicDef | Cinematic;

The cinematic: one of the view's by its id (GameView.cinematics.defs), a def (CinematicDef, as readCinematic reads a file of the editor's), or a script

environment ​

ts
environment?: string | MapEnvironment;

A look to play the map with, over its own: one of the game's by name (GameView.world.environments) or one given whole

error ​

ts
error?: GameScene['error'];

What shows when loading fails, as GameScene.error takes it

exit ​

ts
exit?: GameScene['exit'];

Where the HUD's way out goes (the pause menu's line): then's scene when left out

game ​

ts
game: LoadedGame;

The game whose rules and view the cinematic plays under

id ​

ts
id: string;

The scene's id, by which the app and goTo open it

loading ​

ts
loading?: GameScene['loading'];

What shows while the scene loads, as GameScene.loading takes it

lookAt ​

ts
lookAt?: {
        x: number;
        z: number;
    };

Where the view starts before the cinematic's first shot, in the place of the first player's start

map ​

ts
map?: GameMap | 'none' | ((args: SceneArgs) => GameMap);

The map it plays on, or what makes one each time the scene is opened. A world made in code (world) may stand for it. 'none' for no world at all: a black stage (a title sequence), where the screen, dialog, picture and sound lanes play and what the cinematic puts down (a prop) shows, with no ground, water or sky

name ​

ts
name?: string;

What it is called: on its loading screen, the list of scenes. The cinematic's name or id when left out

onCrash ​

ts
onCrash?: GameScene['onCrash'];

What runs when the game crashes while the cinematic plays, as GameScene.onCrash takes it

pack ​

ts
pack?: MapPack;

The files the map brings with it (MapPack)

params ​

ts
params?: Record<string, unknown>;

What it is handed (Cinematic's params), over play.params

play ​

ts
play?: PlayOptions;

How it is played (PlayOptions): over what the def or the view's entry says. hold is always on (the world stands still for it), the HUD is away, and back changes nothing (the scene ends with it)

reveal ​

ts
reveal?: boolean;

All of the map seen, the fog lifted: yes when left out (a cinematic is not a game the player plays)

skippable ​

ts
skippable?: boolean;

Whether Esc skips it. Yes when left out

startView ​

ts
startView?: string;

A view of the map to start with, by its name (MapCamera)

then ​

ts
then?: CinematicSceneThen;

Where to go once it is over: the list of scenes when left out

view ​

ts
view?: GameView | ((view: GameView) => GameView);

The game's look for this scene: another one, or its own changed