Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Skeleton

Use an array of bones to create a skeleton that can be used by a SkinnedMesh. See the SkinnedMesh page for an example of usage with standard BufferGeometry.

See the ngx3js docs page for details. See the ngx mesh page for a live demo.

Code Example

//  Create a simple "arm"
const bones = [];
const shoulder = new THREE.Bone();
const elbow = new THREE.Bone();
const hand = new THREE.Bone();
shoulder.add( elbow );
elbow.add( hand );
bones.push( shoulder );
bones.push( elbow );
bones.push( hand );
shoulder.position.y = -5;
elbow.position.y = 0;
hand.position.y = 5;
const armSkeleton = new THREE.Skeleton( bones );

Hierarchy

  • Skeleton

Index

Constructors

constructor

Properties

boneInverses

boneInverses: I3JS.Matrix4[]

An array of Matrix4s that represent the inverse of the matrixWorld of the individual bones.

boneMatrices

boneMatrices: Float32Array

The array buffer holding the bone data when using a vertex texture.

boneTexture

boneTexture: I3JS.DataTexture

The DataTexture holding the bone data when using a vertex texture.

boneTextureSize

boneTextureSize: number

The size of the .boneTexture.

bones

bones: I3JS.Bone[]

The array of bones. Note this is a copy of the original array, not a reference, so you can modify the original array without effecting this one.

frame

frame: number

uuid

uuid: string

Methods

calculateInverses

  • calculateInverses(): void

clone

computeBoneTexture

dispose

  • dispose(): void

getBoneByName

init

  • init(): void

pose

  • pose(): void

update

  • update(): void

Generated using TypeDoc