The IKHelper class is a THREE.Object3D used to visually debug and represent Inverse Kinematics (IK) chains and bones in a Three.js scene. It automatically creates meshes and axes helpers for each joint in the provided IK instance.
To use it, pass an existing IK instance and an optional configuration object to the constructor. The helper must be added to your Three.js scene to be visible.
import IKHelper from 'three-ik/IKHelper'; // Adjust path based on your installation
// Assuming 'ik' is an existing IK instance
const helper = new IKHelper(ik, {
color: 0x00ff00,
showBones: true,
showAxes: true,
wireframe: true,
boneSize: 0.1,
axesSize: 0.2
});
scene.add(helper);