SkeletonUtils is an addon, and must be imported explicitly, see Installation#Addons.
import * as SkeletonUtils from 'three/addons/utils/SkeletonUtils.js';
Clones the given 3D object and its descendants, ensuring that any SkinnedMesh instances are correctly associated with their bones. Bones are also cloned, and must be descendants of the object passed to this method. Other data, like geometries and materials, are reused by reference.
source
The 3D object to clone.
Returns: The cloned 3D object.
Retargets the skeleton from the given source to the target.
Both target and source can be a 3D object with a skeleton property (e.g. a skinned mesh) or a Skeleton directly.
target
The target object.
source
The source object.
options
The options.
Retargets the animation clip of the source to the target 3D object.
The source can be a 3D object with a skeleton property (e.g. a skinned mesh) or a Skeleton directly.
target
The target 3D object. Must have a skeleton property.
source
The source object.
clip
The animation clip.
options
The options.
Returns: The retargeted animation clip.
Retarget options of SkeletonUtils.
useFirstFramePosition
boolean
Whether to use the position of the first frame or not.
Default is false.
fps
number
The FPS of the clip.
names
Object.
A dictionary for mapping target to source bone names.
getBoneName
function
A function for mapping bone names. Alternative to names.
trim
Array.
Whether to trim the clip or not. If set the array should hold two values for the start and end.
preserveBoneMatrix
boolean
Whether to preserve bone matrices or not.
Default is true.
preserveBonePositions
boolean
Whether to preserve bone positions or not.
Default is true.
useTargetMatrix
boolean
Whether to use the target matrix or not.
Default is false.
hip
string
The name of the source's hip bone.
Default is 'hip'.
hipInfluence
Vector3
The hip influence.
Default is (1,1,1).
scale
number
The scale.
Default is 1.
localOffsets
Object.
Per-bone local offset matrices, keyed by bone name.
hipPosition
Vector3
An additional position offset applied to the hip bone.