# SkeletonUtils ## Import SkeletonUtils is an addon, and must be imported explicitly, see [Installation#Addons](https://threejs.org/manual/#en/installation). ```js import * as SkeletonUtils from 'three/addons/utils/SkeletonUtils.js'; ``` ## Methods ### .clone( source : Object3D ) : Object3D (inner) 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. ### .retarget( target : Object3D | Skeleton, source : Object3D | Skeleton, options : module:SkeletonUtils~RetargetOptions ) (inner) 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](Skeleton.html) directly. **target** The target object. **source** The source object. **options** The options. ### .retargetClip( target : Object3D, source : Object3D | Skeleton, clip : AnimationClip, options : module:SkeletonUtils~RetargetOptions ) : AnimationClip (inner) 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](Skeleton.html) 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. ## Type Definitions ### .RetargetOptions 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](Vector3.html) 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](Vector3.html) An additional position offset applied to the hip bone. ## Source [examples/jsm/utils/SkeletonUtils.js](https://github.com/mrdoob/three.js/blob/master/examples/jsm/utils/SkeletonUtils.js)