Skip to content

LiteBones beta ​

Interface of @v12-engine/client

ts
export interface LiteBones

A unit's bones as a game turns them, for a frame (UnitsView.afterClips)

Members ​

facing ​

ts
readonly facing: number;

Which way the unit faces, about the world's up (radians: its model's root's rotation.y on Babylon)

find ​

ts
find(name: string): number;

A node by its name in the file, or by what it ends with after a . or a _ ('head' finds Knight_head, as the examples' boneOf finds a node of Babylon's): -1 where there is none

names ​

ts
readonly names: readonly string[];

The rig's nodes by their names in the file, parents first

rotate ​

ts
rotate(node: number, axis: BonePoint, angle: number): void;

Turns a node by angle radians about a way of the world through it (Babylon's rotate(axis, angle, Space.WORLD)); what hangs from it turns with it

worldOf ​

ts
worldOf(node: number, out?: BonePoint): BonePoint;

Where a node is in the world now, the turns of this frame so far taken in: into out (a new point where left out)