Skip to main content

Interface: SkinnedPart

One box of a skinned body. Coordinates are mesh units with the entity's origin at its feet, +y up and +z forward (the direction it faces); the pool scales the whole mesh by the instance's size.

Its index in the part list is its row in the part atlas.

Properties​

at​

• at: Vec3Tuple

Center of the box.


bone​

• bone: number

The bone that moves this box (an index into the family's bones).


paint​

• Optional paint: string | FacePainter

The six faces' art: one CSS colour for every face, or a painter called per face (0=+x, 1=-x, 2=+y, 3=-y, 4=+z front, 5=-z back) on a canvas sized to the face at the atlas's texel density.


pivot​

• Optional pivot: Vec3Tuple

The joint the bone turns this box about (a hip, a neck). Every box on one bone should share it. Defaults to the origin.


size​

• size: Vec3Tuple

Width (x), height (y), depth (z).