Skip to content

MapDetailLevel beta ​

Interface of @v12-engine/engine

ts
export interface MapDetailLevel

One way a thing is drawn, and when, as a map says it (MapDetail.models, MapDoodad.detail): the client's DetailLevel without what only code can say. A level applies when any of its conditions holds; of a thing's levels the last that applies is drawn, the first being its full self

Members ​

draw ​

ts
draw?: 'impostor' | 'none';

What is drawn: a picture of the model (impostor), or nothing (none). The model, or model, when left out

from ​

ts
from?: number;

From this far from the camera, in cells

load ​

ts
load?: 'eager' | 'lazy' | 'never' | {
        region: string;
    };

How its file is loaded: with the model (eager), once something comes near wanting it (lazy, when left out: within half again its distance), by code alone (never), or as the camera comes over a region of the map, by its name

model ​

ts
model?: string;

Another model, by its path in models/, in place of the thing's own

ratio ​

ts
ratio?: number;

Or a lighter version of the full model made from it: this part of its triangles (0.25)

region ​

ts
region?: string;

Or: while the camera is over a region of the map, by its name; or not over it (!name)

shadow ​

ts
shadow?: number;

The level its shadow is drawn at, by index: a lighter one is cheaper, and nobody sees a leaf's shadow. One of nothing casts none. As the shadows' bias says when left out (MapDetail.shadowBias), else the level it is drawn at

under ​

ts
under?: number;

Or: once the thing is at most this tall on the screen, in pixels