Animation · function

addPose

Apply delta on top of base, scaled by weight, into out.

Explained in Animation.

function addPose(base: Pose, delta: Pose, weight: number, out: Pose): void
import { addPose } from '@driftengine/animation';

Parameters

ParameterTypeDescription
basePose
deltaPose
weightnumber
outPose

In depth

A delta, not a target, and the difference is the whole of what additive is for: a wave laid over a walk has to move the arm relative to wherever the walk put it rather than replace it. So translation adds, rotation composes, and scale multiplies — a scale delta of 1 means unchanged, where adding would make it double.

Weight zero is the base untouched, which is what lets a layer fade in from nothing.