Cameras and shots · function

defineCinematic

Validate a script and hand it back, so a data module fails on import:

Explained in Cameras and cinematics.

function defineCinematic(name: string, script: CinematicScript): CinematicScript
import { defineCinematic } from '@driftengine/core';

Parameters

ParameterTypeDescription
namestring
scriptCinematicScript

In depth

export const SEASON_ONE = defineCinematic('season1', { ... });

Loud at load is the only useful moment. A malformed timeline cannot be repaired at runtime and must not be played half-right.