DetailTarget beta
Interface of @v12-engine/client
export interface DetailTargetWhat a thing drawn by levels is, as its drawer hands it to the picker (WorldDetail.track): what it is, where its middle is and how tall it is, what is said of its levels, and what its drawer can draw
Members
can
can?: (level: DetailLevel, index: number) => boolean;Whether its drawer can draw a level now: one it cannot (not made, not loaded) is drawn at the nearest finer that it can
doodad
doodad?: MapDoodad;The doodad it is, where it is scenery of the map and not an entity
entity
entity?: EntityView;The entity it is (a unit, a building, a tree), or the doodad
fallbackLevels
fallbackLevels?: readonly DetailLevel[];What it has where nothing, not the model, the game, the map nor itself, says levels: a baked type's near (draw: 'baked')
full
full?: ModelDef;Its full model, as drawn: what its levels' files are found from, and what keeps them loaded while drawn
height
height: number;How tall it is, in cells
hold
hold?: () => 'full' | 'level' | false | undefined;Whether it is held now, whatever the distance: at full (full: a unit casting, struck this second), or at the level it is at (level: one falling, which does not change its model mid-fall). Nothing or false lets it be picked
kind
kind: DetailKind;Which kind of thing it is: what the stats count apart and the map's cull reaches
model
model: string;Its model, by its path in models/: what the game's and the map's levels by model go by
modelLevels
modelLevels?: readonly DetailLevel[];Its model's own levels (ModelDef.detail, SceneryDef.detail): the first say
ownLevels
ownLevels?: readonly (DetailLevel | MapDetailLevel)[];Its own, over everything said of its model (MapDoodad.detail.levels, UnitLook.detail)
pinned
pinned?: number;Always at this level, by its index (MapDoodad.detail.level)
switched
switched?: (level: number, from: number) => void;Told when the level it is drawn at changes, the one it would be at (DetailThing.wanted), or the one of its shadow (DetailThing.shadow): the drawer draws it so
triangles
triangles?: (index: number) => number;Its triangles at a level, for the stats: none known when left out
x
x: number;Where its middle is, in the world, and how tall it is: the distance and the pixels go by them
y
y: number;The height of its middle, in cells
z
z: number;The other ground axis of its middle, in cells