Skip to content

CellLayerContext beta ​

Interface of @v12-engine/client

ts
export interface CellLayerContext

What 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 ​

ts
asset?(path: string): string;

Where a file of the game's is fetched from, by its path under the page's assets

budget ​

ts
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 ​

ts
burns?(value: number): number | undefined;

How many seconds a style of the layer burns, by its value, as the rules say

cells ​

ts
cells(): Uint8Array | undefined;

The layer's cells, a value a cell, row by row: none where nothing was ever painted

covered ​

ts
readonly covered?: Uint8Array;

How many buildings stand over each cell, a byte a cell: what grass keeps off

detail ​

ts
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 ​

ts
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 ​

ts
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 ​

ts
readonly ground?: GroundPaintSurface;

The ground, to lay paint into (groundPaint, the ash under what burnt): none where the screen has no ground

groundColors ​

ts
groundColors?(): CellGroundColors;

The colours of the ground under the layer as it is drawn (GroundView.groundColors)

groundPaintEvery ​

ts
readonly groundPaintEvery?: number;

Seconds between two workings out of a paint's edge where it changed (Limits.groundPaintEvery): a 30th where left out

layer ​

ts
readonly layer: string;

The layer's id (CellLayerDef.id)

lights ​

ts
readonly lights?: FoliageFireLights;

The lights along a fire's front (fireLights, the world's lamps): none where left out

log ​

ts
log?(message: string): void;

Says what went wrong: the client's log where left out

loop ​

ts
loop?(sound: string): SoundLoop | undefined;

A sound that loops (a fire's crackle): silent where left out

modelLevels ​

ts
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 ​

ts
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 ​

ts
play?(sound: string, at: Vec2, volume?: number): void;

Plays a sound of the game's at a point, 1 the loudest

renderer ​

ts
readonly renderer: Renderer;

The renderer it draws with

sees ​

ts
sees?(x: number, z: number): boolean;

Whether the player sees a point now, through the fog of war: always where left out

terrain ​

ts
readonly terrain: Terrain;

The ground: its heights, its size, every layer's cells

tileset ​

ts
tileset?(): readonly string[];

The ids of the tiles of the terrain's paint, by their index less one

values ​

ts
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 ​

ts
readonly wind?: SceneWind;

The scene's wind (its waves and gusts, one for every layer so their waves line up): still air without one