THREE.JS / FOUNDATIONS 97

Retargeting needs a rest pose.

Compare raw bone rotations with the official local-offset correction, then let CCD inverse kinematics repair a hand target after playback.

Initializing -

Loading the source and target rigs.

Source bones
-
Target bones
-
Offset count
-
IK reach error
-
Correction policy-
Rest-pose accountinglocalOffsets
Official offsets
-
Mean correction
-
Raw → oriented
-
Oriented → IK
-

The official example’s 16 matrices will be applied to the oriented and IK targets.

CCDIK chaintarget -> hand -> forearm -> arm

The IK target will follow the retargeted hand with a controlled offset.

Loading the IK chain...
Orientation + IK lifecycle
retargetClip->localOffsets->target pose->CCDIKSolver.update

The corrected target receives the same converted clip as the raw target before IK runs.

The raw target intentionally keeps the orientation mismatch visible. The oriented target follows the official retargeting example’s per-bone matrices; the fourth model adds the official CCDIK chain. ?forceWebGL=1 forces the WebGL2 backend.

Next: animation groups ->
LAB 97 / ORIENTATION + IK