Skip to content

DetailTarget beta ​

Interface of @v12-engine/client

ts
export interface DetailTarget

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

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

ts
doodad?: MapDoodad;

The doodad it is, where it is scenery of the map and not an entity

entity ​

ts
entity?: EntityView;

The entity it is (a unit, a building, a tree), or the doodad

fallbackLevels ​

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

ts
full?: ModelDef;

Its full model, as drawn: what its levels' files are found from, and what keeps them loaded while drawn

height ​

ts
height: number;

How tall it is, in cells

hold ​

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

ts
kind: DetailKind;

Which kind of thing it is: what the stats count apart and the map's cull reaches

model ​

ts
model: string;

Its model, by its path in models/: what the game's and the map's levels by model go by

modelLevels ​

ts
modelLevels?: readonly DetailLevel[];

Its model's own levels (ModelDef.detail, SceneryDef.detail): the first say

ownLevels ​

ts
ownLevels?: readonly (DetailLevel | MapDetailLevel)[];

Its own, over everything said of its model (MapDoodad.detail.levels, UnitLook.detail)

pinned ​

ts
pinned?: number;

Always at this level, by its index (MapDoodad.detail.level)

switched ​

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

ts
triangles?: (index: number) => number;

Its triangles at a level, for the stats: none known when left out

x ​

ts
x: number;

Where its middle is, in the world, and how tall it is: the distance and the pixels go by them

y ​

ts
y: number;

The height of its middle, in cells

z ​

ts
z: number;

The other ground axis of its middle, in cells