Capítulo 316 de 859
Visualizes the motion path of an animated object based on position keyframes from an AnimationClip.
const clip = model.animations[ 0 ];
const helper = new AnimationPathHelper( model, clip, object );
scene.add( helper );
Constructor
| Signature |
|---|
new AnimationPathHelper( root : Object3D, clip : AnimationClip, object : Object3D, options : Object ) |
Properties
| Property | Description |
|---|---|
.clip : AnimationClip | The animation clip containing position keyframes. |
.divisions : number | Number of samples for smooth path interpolation. |
.isAnimationPathHelper : boolean (readonly) | This flag can be used for type testing. |
.line : Line | The line representing the animation path. |
.object : Object3D | The object whose path is being visualized. |
| `.points : Points | null` |
.root : Object3D | The root object containing the animation clips. |
Methods
| Method | Description |
|---|---|
.dispose() | Frees the GPU-related resources allocated by this instance. |
| `.setColor( color : number | Color |
| `.setMarkerColor( color : number | Color |
.updateMatrixWorld( force : boolean ) | Updates the helper's transform to match the object's parent. |