Animation · function

createPose

A pose sized for jointCount joints, already at rest.

Explained in Animation.

function createPose(jointCount: number): Pose
import { createPose } from '@driftengine/animation';

Parameters

ParameterTypeDescription
jointCountnumber

In depth

At rest rather than zeroed, and that is a correctness matter rather than a convenience. A zero quaternion normalises to NaN and a zero scale collapses every vertex the joint touches, so a caller who allocates a pose and forgets to rest it would get a rig that vanishes rather than one that stands still. The same reasoning vertexDefaults.ts gives for handing an absent tangent (1, 0, 0, 1) instead of zero: the safe default is a usable value, never a sentinel that arithmetic turns into NaN.