UnitModel beta
Interface of @v12-engine/client/lite-views
export interface UnitModelA unit's model on the card: its rig, its clips, its pieces and their batches
Members
all
all: Copies[];Every batch made of it
baked
baked?: {
frames: BakedFrames;
texture: DataTexture;
};Its clips baked, and their rows on the card, where any of its kinds' clips is there
bones
bones: MaskBone[];Its rig as the masks read it: its nodes by name, each with its parent's
clipNames
clipNames: string[];The names of its clips
clips
clips: Map<string, Clip>;Its clips by name, the first of a name the one played
glow
glow: ModelDef['glow'];How its look says it glows (ModelDef.glow)
glowing
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
key: string;What it is loaded once for (modelKey): its file, what it holds, the clips laid on it, how it is painted
level
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
levels: ModelPiece[][];The triangles of each level: its own first (pieces), then the lighter ones read so far
max
max: [number, number, number];The highest corner of its box at rest (min the lowest)
min
min: [number, number, number];How tall it stands and how far it reaches at rest, in its own units
pieces
pieces: ModelPiece[];The triangles of each material of it at full, on the card
point
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
poses: PoseRows;The rows of the poses its skeletons are posed in: of its rig's size (PoseRows.for)
rig
rig: Rig;The nodes that move its skin, with their rest and inverse binds
sets
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
still: boolean;It has no clips at all: a copy of its rest wherever it stands (a building)
team
team: boolean;Its copies carry their owner's colour for the cells of its picture that take it
triangles
triangles: number;How many triangles it is drawn with at full