|
@@ -12105,7 +12105,7 @@ var BABYLON;
|
|
* Returns the current version of the framework
|
|
* Returns the current version of the framework
|
|
*/
|
|
*/
|
|
get: function () {
|
|
get: function () {
|
|
- return "3.2.0-rc.2";
|
|
|
|
|
|
+ return "3.2.0-rc.3";
|
|
},
|
|
},
|
|
enumerable: true,
|
|
enumerable: true,
|
|
configurable: true
|
|
configurable: true
|
|
@@ -104705,8 +104705,6 @@ var BABYLON;
|
|
var promises = new Array();
|
|
var promises = new Array();
|
|
var babylonMesh = new BABYLON.Mesh(node.name || "node" + node._index, this._babylonScene, node._parent._babylonMesh);
|
|
var babylonMesh = new BABYLON.Mesh(node.name || "node" + node._index, this._babylonScene, node._parent._babylonMesh);
|
|
node._babylonMesh = babylonMesh;
|
|
node._babylonMesh = babylonMesh;
|
|
- node._babylonAnimationTargets = node._babylonAnimationTargets || [];
|
|
|
|
- node._babylonAnimationTargets.push(babylonMesh);
|
|
|
|
GLTFLoader._LoadTransform(node, babylonMesh);
|
|
GLTFLoader._LoadTransform(node, babylonMesh);
|
|
if (node.mesh != undefined) {
|
|
if (node.mesh != undefined) {
|
|
var mesh = GLTFLoader._GetProperty(context + "/mesh", this._gltf.meshes, node.mesh);
|
|
var mesh = GLTFLoader._GetProperty(context + "/mesh", this._gltf.meshes, node.mesh);
|
|
@@ -104970,8 +104968,8 @@ var BABYLON;
|
|
var boneIndex = skin.joints.indexOf(node._index);
|
|
var boneIndex = skin.joints.indexOf(node._index);
|
|
babylonBone = new BABYLON.Bone(node.name || "joint" + node._index, skin._babylonSkeleton, babylonParentBone, this._getNodeMatrix(node), null, null, boneIndex);
|
|
babylonBone = new BABYLON.Bone(node.name || "joint" + node._index, skin._babylonSkeleton, babylonParentBone, this._getNodeMatrix(node), null, null, boneIndex);
|
|
babylonBones[node._index] = babylonBone;
|
|
babylonBones[node._index] = babylonBone;
|
|
- node._babylonAnimationTargets = node._babylonAnimationTargets || [];
|
|
|
|
- node._babylonAnimationTargets.push(babylonBone);
|
|
|
|
|
|
+ node._babylonBones = node._babylonBones || [];
|
|
|
|
+ node._babylonBones.push(babylonBone);
|
|
return babylonBone;
|
|
return babylonBone;
|
|
};
|
|
};
|
|
GLTFLoader.prototype._loadSkinInverseBindMatricesDataAsync = function (context, skin) {
|
|
GLTFLoader.prototype._loadSkinInverseBindMatricesDataAsync = function (context, skin) {
|
|
@@ -105068,7 +105066,7 @@ var BABYLON;
|
|
var targetNode = GLTFLoader._GetProperty(context + "/target/node", this._gltf.nodes, channel.target.node);
|
|
var targetNode = GLTFLoader._GetProperty(context + "/target/node", this._gltf.nodes, channel.target.node);
|
|
// Ignore animations that have no animation targets.
|
|
// Ignore animations that have no animation targets.
|
|
if ((channel.target.path === "weights" /* WEIGHTS */ && !targetNode._numMorphTargets) ||
|
|
if ((channel.target.path === "weights" /* WEIGHTS */ && !targetNode._numMorphTargets) ||
|
|
- (channel.target.path !== "weights" /* WEIGHTS */ && !targetNode._babylonAnimationTargets)) {
|
|
|
|
|
|
+ (channel.target.path !== "weights" /* WEIGHTS */ && !targetNode._babylonMesh)) {
|
|
return Promise.resolve();
|
|
return Promise.resolve();
|
|
}
|
|
}
|
|
// Ignore animations targeting TRS of skinned nodes.
|
|
// Ignore animations targeting TRS of skinned nodes.
|
|
@@ -105199,13 +105197,17 @@ var BABYLON;
|
|
var animationName = babylonAnimationGroup.name + "_channel" + babylonAnimationGroup.targetedAnimations.length;
|
|
var animationName = babylonAnimationGroup.name + "_channel" + babylonAnimationGroup.targetedAnimations.length;
|
|
var babylonAnimation = new BABYLON.Animation(animationName, targetPath, 1, animationType);
|
|
var babylonAnimation = new BABYLON.Animation(animationName, targetPath, 1, animationType);
|
|
babylonAnimation.setKeys(keys);
|
|
babylonAnimation.setKeys(keys);
|
|
- if (targetNode._babylonAnimationTargets) {
|
|
|
|
- for (var _i = 0, _a = targetNode._babylonAnimationTargets; _i < _a.length; _i++) {
|
|
|
|
- var babylonAnimationTarget = _a[_i];
|
|
|
|
- var babylonAnimationClone = babylonAnimation.clone();
|
|
|
|
- babylonAnimationTarget.animations.push(babylonAnimationClone);
|
|
|
|
- babylonAnimationGroup.addTargetedAnimation(babylonAnimationClone, babylonAnimationTarget);
|
|
|
|
|
|
+ if (targetNode._babylonBones) {
|
|
|
|
+ var babylonAnimationTargets = [targetNode._babylonMesh].concat(targetNode._babylonBones);
|
|
|
|
+ for (var _i = 0, babylonAnimationTargets_1 = babylonAnimationTargets; _i < babylonAnimationTargets_1.length; _i++) {
|
|
|
|
+ var babylonAnimationTarget = babylonAnimationTargets_1[_i];
|
|
|
|
+ babylonAnimationTarget.animations.push(babylonAnimation);
|
|
}
|
|
}
|
|
|
|
+ babylonAnimationGroup.addTargetedAnimation(babylonAnimation, babylonAnimationTargets);
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ targetNode._babylonMesh.animations.push(babylonAnimation);
|
|
|
|
+ babylonAnimationGroup.addTargetedAnimation(babylonAnimation, targetNode._babylonMesh);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|