27 lines
589 B
JavaScript
27 lines
589 B
JavaScript
/**
|
|
* BoneWeight object - associates a vertex to a bone with some weight
|
|
* @param boneIndex int
|
|
* @param weight float
|
|
* @constructor
|
|
*/
|
|
GameLib.D3.API.BoneWeight = function (
|
|
boneIndex,
|
|
weight
|
|
) {
|
|
this.boneIndex = boneIndex;
|
|
this.weight = weight;
|
|
};
|
|
|
|
/**
|
|
* Object to GameLib.D3.API.BoneWeight
|
|
* @param objectBoneWeight
|
|
* @returns {GameLib.D3.API.BoneWeight}
|
|
* @constructor
|
|
*/
|
|
GameLib.D3.API.BoneWeight.FromObject = function(objectBoneWeight) {
|
|
return new GameLib.D3.API.BoneWeight(
|
|
objectBoneWeight.boneIndex,
|
|
objectBoneWeight.weight
|
|
)
|
|
};
|