MapDetailLevel beta
Interface of @v12-engine/engine
export interface MapDetailLevelOne 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
draw?: 'impostor' | 'none';What is drawn: a picture of the model (impostor), or nothing (none). The model, or model, when left out
from
from?: number;From this far from the camera, in cells
load
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
model?: string;Another model, by its path in models/, in place of the thing's own
ratio
ratio?: number;Or a lighter version of the full model made from it: this part of its triangles (0.25)
region
region?: string;Or: while the camera is over a region of the map, by its name; or not over it (!name)
shadow
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
under?: number;Or: once the thing is at most this tall on the screen, in pixels