Skip to content

LaneDef beta ​

Interface of @v12-engine/client

ts
export interface LaneDef<Item extends LaneItem = LaneItem>

A lane: see the top of this file

Members ​

editor ​

ts
editor?: LaneEditor<Item>;

How the editor draws the lane and edits its items; the lane has no editor support when left out

ending ​

ts
ending?(cut: Cut, item: Item): Promise<void> | void;

What a run item does as its time is up, before it is ended: a promise stands the cinematic's clock still until it settles (CutClock.hold), and the item is ended then. A line of dialog that waits to be moved on holds the picture on it so. Not called for an item ended early (a seek, a skip)

kind ​

ts
kind: string;

Its kind, as a def's lane names it: camera, dialog, or a game's own (melee.cheer)

length ​

ts
length?(item: Item, cut?: Cut): number | undefined;

Seconds an item lasts where for leaves it out, so that a seek knows whether it lands inside it: a line's voice, or its reading time. Nothing for one whose length the lane cannot know (a clip of a model). cut, where there is one playing, knows how long its sounds are (cut.soundSeconds)

name ​

ts
name: string;

What the editor calls it

reached ​

ts
reached?(cut: Cut, key: Item): void;

A key of the lane reached as the time goes on (not one a seek jumped past): for what a key means beyond its value, like the camera's shot hook. Every key reached is heard as lane:<kind>:key besides

read ​

ts
read?(item: RawItem, what: string): Item;

Reads an item of the file: checks the lane's own fields and gives the item. What every item has (at, for, ease, when) is checked before it is called. Kept as it is when left out

run ​

ts
run?(cut: Cut, item: Item, from: number): Stop | LaneRun | void;

Run: starts an item, from seconds into it when seeked there (0 as a rule). What it returns ends it early: a Stop, or a LaneRun with what code may reach of it (cut.running) and when it ended by itself

sample ​

ts
sample?(cut: Cut, items: readonly Item[], t: number): void;

Sampled: sets the lane's value at t seconds of the cinematic, pure in t

skipped ​

ts
skipped?(cut: Cut, items: readonly Item[], end: number): void;

The cinematic skipped while the lane's def plays (end its length in seconds): what of the lane outlives the cinematic left as its end would leave it, not as the skip found it. The screen lane's fade, met part way

start ​

ts
start?(cut: Cut, items: readonly Item[]): void;

Called as the lane begins, or begins again after a seek: for what the lane sets up once (the camera let go of what it followed)