ClientFrame beta
Class of @v12-engine/client
export declare class ClientFrameThe frame of the game: an ordered list of named phases, run one after the other each frame (client.frame). The client's own are CLIENT_PHASES; a game adds its own before or after one by name (add, or GameView.framePhases declared), for a pass of its own over the picture, or something to move before the camera does
Members
constructor
constructor(phases: readonly FramePhase[],
times?: PhaseTimes | undefined);Constructs a new instance of the ClientFrame class
add
add(phase: FramePhase, place?: PhasePlace): () => void;Adds a phase where place says (at the end when it says nothing), from the next frame on. Gives back what takes it out again. Throws when the phase it is placed by is not there, or one of its name already is
names
get names(): string[];The phases' names, in the order they run
now
readonly now: FrameInfo;The frame under way, or the last one: what the phases are given
phases
get phases(): readonly FramePhase[];The phases, in the order they run
run
run(): boolean;Runs the phases in order. Whether the frame ran to its end: false when a phase ended it