Animation · function

blendPoses

Blend a toward b by t, into out.

Explained in Animation.

function blendPoses(a: Pose, b: Pose, t: number, out: Pose): void
import { blendPoses } from '@driftengine/animation';

Parameters

ParameterTypeDescription
aPose
bPose
tnumber
outPose

In depth

Clamped rather than extrapolated. A weight past the ends puts limbs outside their range, which reads as a broken rig rather than as a weight out of bounds — the same reasoning sampleClip holds at a track's ends for. What it costs is that a caller cannot deliberately overshoot; what would make it wrong is somebody wanting to, and the honest answer then is a function that says so in its name.

Safe when out is also a or b: every component is read before it is written.