PreviewWorld beta
Class of @v12-engine/editor
export declare class PreviewWorldThe world the cinematic preview runs (see the top of this file)
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the PreviewWorld class.
Members
advance
advance(seconds: number): boolean;Moves the world on by seconds of the cinematic's screen, at its pace: the ticks that fall in them run, and what they changed is drawn (host.show). Whether a tick ran
checkpoint
checkpoint(at: number): void;Saves the world as it stands, at a moment of the cinematic's clock, to run on from after a scrub
cutWorld
get cutWorld(): CutWorld;What the cinematic's waits read of it: the snapshots as drawn, and the seat's sight (the whole map)
direct
direct(command: Record<string, unknown>): void;Sends a director's command for a cinematic; held still, the world goes on a tick so that it lands at once
directs
directs(): boolean;Whether the game takes a director's commands (directorPack)
dispose
dispose(): void;Puts the world away, its checkpoints with it: the preview is stopped, or taken off. Another is made as one is next wanted
forget
forget(): void;The map or the game changed: the world is one of another map now, and is made anew (from the start, with no checkpoint kept) as it is next wanted (ready)
holds
holds: number;How many cinematics hold the world still (PlayOptions.hold): it moves on a tick only for a command (direct)
load
load(checkpoint: PreviewCheckpoint): Promise<boolean>;The world as a checkpoint had it, to run on from
make
make(): Promise<boolean>;A world of the map as it is now, from its start, made anew as Play here makes its game (the one there was goes). Whether there is one: a map that cannot be played (said once) has none, and the preview plays with no world
named
named(name: string): number | undefined;The world's own id of a unit by the name the map or the cinematic gave it, as it is drawn now
nav
get nav(): Navigation | undefined;The navigation of the world made (make), to read: none before
nearest
nearest(at: number, usable?: (time: number) => boolean): PreviewCheckpoint | undefined;The latest checkpoint at or before a moment of the clock that usable takes, or none: the start
playerId
get playerId(): PlayerId | undefined;The seat the world is played from
rate
rate: number;The world's seconds for every second of the cinematic's screen: 1, or slow motion's (StageTime.rate); nothing moves at 0
ready
get ready(): boolean;Whether a world runs: made, and not to be made anew
refresh
refresh(): void;Draws the world as it stands now (host.show): as it is first shown on the stage, and again after a load
runsHeld
runsHeld: boolean;Whether it runs on while held (StageTime.rate's run)
send
send(command: PlayerCommand): void;Sends a command as the seat's player: the cinematic's orders
tickRate
get tickRate(): number;Ticks a second of the world's
untilTick
untilTick(): number;Seconds of the cinematic's screen until its next tick, at its pace: what the preview steps the cinematic by, so that an order sent in the step lands on that tick. None where it stands still