Skip to content

Skeleton beta ​

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

ts
export declare class Skeleton

One unit's skeleton: its pose, and the players of its clips

Members ​

constructor ​

ts
constructor(
    rig: Rig);

Constructs a new instance of the Skeleton class

box ​

ts
box(unit: Float32Array, margin: number, out: Float32Array): void;

The box around its joints as posed, in the world under unit (a unit's matrix, 16 floats, a point a row), each joint reaching margin round it: into out (its lowest corner, then its highest)

changed ​

ts
changed: boolean;

Whether the pose was written since this was last set false: its matrices are to be worked out again

palette ​

ts
palette(out: Float32Array, at: number): void;

The pose's matrices for the skin, into out from at: nothing but zeros for a joint that is not drawn (show)

player ​

ts
player(clip: Clip): ClipPlayer;

A player of a clip on this skeleton

pose ​

ts
readonly pose: Float32Array;

Each node's place, turn and size now (POSE_FLOATS a node), kept from frame to frame: the rig's rest at first

rig ​

ts
readonly rig: Rig;

The rig it poses

show ​

ts
show(shown: ReadonlyMap<string, boolean> | undefined): void;

Which of its nodes are drawn, by name (a building's as the stages of its going up have them): one said false is not, with everything under it; one not said is. What is bound to a node not drawn is drawn nowhere

turning ​

ts
turning(on: boolean): void;

A game turns bones over the clips' pose of this frame (bones.ts), or no longer (false): the pose as the clips left it is kept, to start the next frame from, so what is turned is not turned again on top of it; let go, the clips' pose is drawn again

update ​

ts
update(dt: number): void;

A frame: every player that plays goes on by dt seconds and writes the pose, in their order