LiteRenderKit beta
Interface of @v12-engine/client
export interface LiteRenderKitWhat a game's own renderer is made with
Members
draw
readonly draw: KitDraw;Shapes at places, in colours
drawn
drawn(id: number): {
x: number;
y: number;
z: number;
visible: boolean;
} | undefined;Where an entity is drawn now, between two ticks; nothing for one that is not
eases
readonly eases: EaseRegistry;The easing curves by name, the client's and the game's
fx
readonly fx?: KitFx;The effects, where the world plays any
lamps
readonly lamps: KitLamps;The lights besides the sun and the sky
log
readonly log: Logger;Where a renderer of the game's says what went wrong
optional
optional<T>(service: Service<T>): T | undefined;What provides a service, or nothing
provide
provide<T>(service: Service<T>, made: T): void;Gives a service by its name (service<RoadsApi>('roads')), for the other renderers and the game to ask for: once (services.ts; the client's RenderKit.provide)
require
require<T>(service: Service<T>): T;What provides a service: thrown, naming it, where no renderer does (the client's own: units, marks)
ring
ring(x: number, z: number, colour: KitRgb, from: number, to: number): void;A ring on the ground that grows from one radius to another and fades, then goes
rings
readonly rings: KitRings;The ground's circles, by name
root
readonly root: HTMLElement;The element the game is on: what a renderer puts on the page goes in it
state
readonly state: GameState;What the player knows of the game: the entities drawn
terrain
readonly terrain: Terrain;The ground: heights, the water's
timers
readonly timers: ViewTimers;Timers on the view's clock: what waits or eases over frames
visualOf
visualOf(entity: EntityView): {
height?: number;
} | undefined;What an entity's type looks like, as far as a renderer of the game's reads it: how tall it stands