CellLayerContext beta
Interface of @v12-engine/client
export interface CellLayerContextWhat a part of a layer's look is made with on the renderer (LiteLayerFactory): the layer, the renderer, the ground, the cells, and what of the world it may draw with
Members
asset
asset?(path: string): string;Where a file of the game's is fetched from, by its path under the page's assets
budget
readonly budget?: FrameBudget;The frame's budget for the work done in pieces (its foliage work): all of it at once where left out
burns
burns?(value: number): number | undefined;How many seconds a style of the layer burns, by its value, as the rules say
cells
cells(): Uint8Array | undefined;The layer's cells, a value a cell, row by row: none where nothing was ever painted
covered
readonly covered?: Uint8Array;How many buildings stand over each cell, a byte a cell: what grass keeps off
detail
readonly detail?: FoliageDetail;How far a model's lighter files are drawn from, as the player's Detail says: every level at its distance where left out
effect
effect?(effect: unknown, options: {
at: Vec2;
params?: Record<string, number>;
}): void;Plays an effect of the game's (leaves flying off): TODO with the effects
fx
readonly fx?: FoliageFireContext['fx'];The effects (lite/fx FxView): what plays over burning cells (FoliageFireView: flames, smoke, embers). No fire is drawn over them where left out (the glow of their burning edge is the grass's own)
ground
readonly ground?: GroundPaintSurface;The ground, to lay paint into (groundPaint, the ash under what burnt): none where the screen has no ground
groundColors
groundColors?(): CellGroundColors;The colours of the ground under the layer as it is drawn (GroundView.groundColors)
groundPaintEvery
readonly groundPaintEvery?: number;Seconds between two workings out of a paint's edge where it changed (Limits.groundPaintEvery): a 30th where left out
layer
readonly layer: string;The layer's id (CellLayerDef.id)
lights
readonly lights?: FoliageFireLights;The lights along a fire's front (fireLights, the world's lamps): none where left out
log
log?(message: string): void;Says what went wrong: the client's log where left out
loop
loop?(sound: string): SoundLoop | undefined;A sound that loops (a fire's crackle): silent where left out
modelLevels
modelLevels?(src: string): readonly {
src: string;
ratio?: number;
}[] | undefined;A model's lighter files made beside it, and the part of its triangles each keeps (Assets.levelsOf)
models
readonly models?: SceneryModels;The models' files on the card (SceneryModels): what a style's bushes and a tuft of a model are drawn from
play
play?(sound: string, at: Vec2, volume?: number): void;Plays a sound of the game's at a point, 1 the loudest
renderer
readonly renderer: Renderer;The renderer it draws with
sees
sees?(x: number, z: number): boolean;Whether the player sees a point now, through the fog of war: always where left out
terrain
readonly terrain: Terrain;The ground: its heights, its size, every layer's cells
tileset
tileset?(): readonly string[];The ids of the tiles of the terrain's paint, by their index less one
values
values?(): readonly number[] | undefined;The values the game names for the layer: a value on cells it does not name is drawn as the layer
wind
readonly wind?: SceneWind;The scene's wind (its waves and gusts, one for every layer so their waves line up): still air without one