65 lines
1.3 KiB
JavaScript
65 lines
1.3 KiB
JavaScript
/**
|
|
* Bone Superset
|
|
* @param id
|
|
* @param name string
|
|
* @param boneId
|
|
* @param childBoneIds
|
|
* @param parentBoneId
|
|
* @param quaternion
|
|
* @param position
|
|
* @param rotation
|
|
* @param scale GameLib.D3.Vector3
|
|
* @param up
|
|
* @constructor
|
|
*/
|
|
GameLib.D3.Bone = function Bone(
|
|
id,
|
|
boneId,
|
|
name,
|
|
childBoneIds,
|
|
parentBoneId,
|
|
quaternion,
|
|
position,
|
|
rotation,
|
|
scale,
|
|
up
|
|
) {
|
|
this.id = id;
|
|
this.name = name;
|
|
this.boneId = boneId;
|
|
|
|
if (typeof childBoneIds == 'undefined') {
|
|
childBoneIds = [];
|
|
}
|
|
this.childBoneIds = childBoneIds;
|
|
|
|
if (typeof parentBoneId == 'undefined') {
|
|
parentBoneId = null;
|
|
}
|
|
this.parentBoneId = parentBoneId;
|
|
|
|
if (typeof quaternion == 'undefined') {
|
|
quaternion = new GameLib.D3.Vector4();
|
|
}
|
|
this.quaternion = quaternion;
|
|
|
|
if (typeof position == 'undefined') {
|
|
position = new GameLib.D3.Vector3(0,0,0);
|
|
}
|
|
this.position = position;
|
|
|
|
if (typeof rotation == 'undefined') {
|
|
rotation = new GameLib.D3.Vector3(0,0,0);
|
|
}
|
|
this.rotation = rotation;
|
|
|
|
if (typeof scale == 'undefined') {
|
|
scale = new GameLib.D3.Vector3(1,1,1);
|
|
}
|
|
this.scale = scale;
|
|
|
|
if (typeof up == 'undefined') {
|
|
up = new GameLib.D3.Vector3(0,1,0);
|
|
}
|
|
this.up = up;
|
|
}; |