Skip to content

UnitModel beta ​

Interface of @v12-engine/client/lite-views

ts
export interface UnitModel

A unit's model on the card: its rig, its clips, its pieces and their batches

Members ​

all ​

ts
all: Copies[];

Every batch made of it

baked ​

ts
baked?: {
        frames: BakedFrames;
        texture: DataTexture;
    };

Its clips baked, and their rows on the card, where any of its kinds' clips is there

bones ​

ts
bones: MaskBone[];

Its rig as the masks read it: its nodes by name, each with its parent's

clipNames ​

ts
clipNames: string[];

The names of its clips

clips ​

ts
clips: Map<string, Clip>;

Its clips by name, the first of a name the one played

glow ​

ts
glow: ModelDef['glow'];

How its look says it glows (ModelDef.glow)

glowing ​

ts
glowing: {
        set: Copies;
        emissive: readonly [number, number, number];
    }[];

The batches that glow, each with what its material shines with: told again as the hour changes

key ​

ts
key: string;

What it is loaded once for (modelKey): its file, what it holds, the clips laid on it, how it is painted

level ​

ts
level(src: string): number | undefined;

The level of a lighter file, by its path: its place in levels once it is read (asking starts that), nothing until then, 0 for one that could not be

levels ​

ts
levels: ModelPiece[][];

The triangles of each level: its own first (pieces), then the lighter ones read so far

max ​

ts
max: [number, number, number];

The highest corner of its box at rest (min the lowest)

min ​

ts
min: [number, number, number];

How tall it stands and how far it reaches at rest, in its own units

pieces ​

ts
pieces: ModelPiece[];

The triangles of each material of it at full, on the card

point ​

ts
point(name: string, offset?: readonly [number, number, number]): ModelPoint | undefined;

A place on it by name (ModelDef.points, else a node of its file): nothing where it has no such place

poses ​

ts
poses: PoseRows;

The rows of the poses its skeletons are posed in: of its rig's size (PoseRows.for)

rig ​

ts
rig: Rig;

The nodes that move its skin, with their rest and inverse binds

sets ​

ts
sets(baked: boolean, variant: string, level?: number, drawn?: DrawnFor): Copies[];

The batch of each piece for a way of drawing: baked copies or skeletons, the shader's variant, the level, what for

still ​

ts
still: boolean;

It has no clips at all: a copy of its rest wherever it stands (a building)

team ​

ts
team: boolean;

Its copies carry their owner's colour for the cells of its picture that take it

triangles ​

ts
triangles: number;

How many triangles it is drawn with at full