new Skeleton()
Use an array of bones to create a skeleton that can be used by a SkinnedMesh.
- Source:
Members
boneMatrices :Float32Array
The array buffer holding the bone data.
Type:
- Float32Array
- Source:
bones :Array.<zen3d.Bone>
The array of bones.
Type:
- Array.<zen3d.Bone>
- Default Value:
- []
- Source:
boneTexture :zen3d.Texture2D|undefined
The zen3d.Texture2D holding the bone data when using a vertex texture.
Use vertex texture to update boneMatrices, by that way, we can use more bones on phone.
Type:
- zen3d.Texture2D | undefined
- Default Value:
- undefined
- Source:
Methods
getBoneByName(name) → {zen3d.Bone}
Searches through the skeleton's bone array and returns the first with a matching name.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | - String to match to the Bone's .name property. |
- Source:
Returns:
- Type
- zen3d.Bone
pose()
Returns the skeleton to the base pose.
- Source:
updateBones(name) → {zen3d.Bone}
Updates the boneMatrices and boneTexture after changing the bones.
This is called automatically if the skeleton is used with a SkinnedMesh.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | - String to match to the Bone's .name property. |
- Source:
Returns:
- Type
- zen3d.Bone