THREE.IK is an inverse kinematics library for three.js, supporting a FABRIK iterative solver, multiple chains, multiple effectors, and constraints.
"Bones" are used in skinned mesh animations in computer graphics, controlled via inverse kinematics (IK) or forward kinematics (FK). Animating an arm, for example, can be handled by forward kinematics, rotating bones from parent to child (shoulder, elbow, wrist). Often animators want to specify where the end of the bone chain should be, and with inverse kinematics and constraints, can automatically solve for the rotation of the ancestor bones.
THREE.IK uses a Forward And Backwards Reaching Inverse Kinematics (FABRIK) solver to accomplish this. In short, FABRIK works in two passes. First, the forward pass moves the end effector to the target destination, and incrementally adjusts its ancestor joints according to its constraints. Next, the backward pass moves the root joint to its initial position, and incrementally adjusts its descendant joints, ending at the end effector.
There are other IK solutions (namely CCD) that may be used instead of FABRIK, each with different tradeoffs.
THREE.IK's goals were to provide a baseline IK solution, and more importantly, facilitate a place for 3D web developers to discuss what the web needs from an inverse kinematics library. Discussions are archived on additional constraints, alternative IK solvers, general API design, and simulated annealing.
Currently (2020), development is not active on THREE.IK, although that may change with the availability of WebXR.
- THREE.IK on GitHub
- THREE.IK Documentation
- FABRIK: a fast, iterative solver for the inverse kinematics problem
- CCD Algorithm
- Create your own IK in Unity - Luis Bermudez
- Inverse Kinematics with Quaternion Joint Limits - Jonathan Blow
- fullik: JS port of Caliko, Java implementation of FABRIK
- webIK: JS port of VRIK
- fabrik-2d: JS 2D FABRIK
- fabrik: Unity component