Skip to content

DetailLevel beta ​

Interface of @v12-engine/client

ts
export interface DetailLevel extends Omit<MapDetailLevel, 'draw'>

One way a thing is drawn, and when (ModelDef.detail, SceneryDef.detail, UnitLook.detail, GameView.world.detail): its full model, a lighter one, a picture of it, or nothing. A thing's levels are tried from the last (the lightest) to the first, and the last that applies is drawn; the first is its full self, whatever it says. A level applies when any of its conditions holds (from, under, region, when); one with none never does

Members ​

draw ​

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

What is drawn: a model (its file and its options), a picture of the model (impostor: scenery, and trees and mines as entities; a unit or a building is drawn at its finer level), a unit among the copies of its baked crowd (baked: its own skeleton at the levels before, UnitLook.baked), or nothing (none). The thing's own model (or model, by its path; or ratio of it) when left out

when ​

ts
when?: (context: DetailContext) => boolean;

Or: in code, given everything the picker knows (DetailContext). True takes this level