r3-legacy/src/game-lib-d3-api-bone-weight.js

27 lines
589 B
JavaScript
Raw Normal View History

2016-10-14 12:32:53 +02:00
/**
* BoneWeight object - associates a vertex to a bone with some weight
* @param boneIndex int
* @param weight float
* @constructor
*/
2016-12-23 16:07:10 +01:00
GameLib.D3.API.BoneWeight = function (
2016-10-14 12:32:53 +02:00
boneIndex,
weight
) {
this.boneIndex = boneIndex;
this.weight = weight;
2017-01-06 16:53:53 +01:00
};
/**
* Object to GameLib.D3.API.BoneWeight
* @param objectBoneWeight
* @returns {GameLib.D3.API.BoneWeight}
* @constructor
*/
2017-06-14 14:21:57 +02:00
GameLib.D3.API.BoneWeight.FromObject = function(objectBoneWeight) {
2017-01-06 16:53:53 +01:00
return new GameLib.D3.API.BoneWeight(
objectBoneWeight.boneIndex,
objectBoneWeight.weight
)
};