EaseRegistry beta
Class of @v12-engine/client
export declare class EaseRegistryThe eases a cinematic may name (cinematic plan B1): how a key is reached, how a shot accelerates. An ease is a curve from 0 to 1: given how far along the time is, it says how far along the move is. Straight (linear) moves at one speed and stops dead; inOutQuad starts and ends gently, as a real camera operator does; outBack goes a little past and settles. A def names one by its name ("ease": "inOutCubic"); code may hand a function. The client's own are the curves of viewTimers.ease, registered as the game starts (kit.eases); a game adds its own (GameView.cinematics.eases, or kit.eases.add in code), and one of a name already there takes its place
Members
constructor
constructor(eases?: Record<string, Ease>);Constructs a new instance of the EaseRegistry class
add
add(name: string, ease: Ease): void;Registers an ease under a name, replacing one of that name
get
get(name: string): Ease | undefined;The ease of a name, or nothing for one not known
has
has(name: string): boolean;Whether an ease of that name is registered
names
names(): string[];Every name, in the order they were added: what the editor's Ease field offers
of
of(ease: Ease | string | undefined): Ease;The ease something names: a function as it is; a name's, or straight for a name not known (the def's key is still reached, in a straight line) or none