|
@@ -10268,6 +10268,19 @@ var BABYLON;
|
|
this._reject(e);
|
|
this._reject(e);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ Object.defineProperty(InternalPromise.prototype, "_result", {
|
|
|
|
+ get: function () {
|
|
|
|
+ return this._resultValue;
|
|
|
|
+ },
|
|
|
|
+ set: function (value) {
|
|
|
|
+ this._resultValue = value;
|
|
|
|
+ if (this._parent && this._parent._result === undefined) {
|
|
|
|
+ this._parent._result = value;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ enumerable: true,
|
|
|
|
+ configurable: true
|
|
|
|
+ });
|
|
InternalPromise.prototype.catch = function (onRejected) {
|
|
InternalPromise.prototype.catch = function (onRejected) {
|
|
return this.then(undefined, onRejected);
|
|
return this.then(undefined, onRejected);
|
|
};
|
|
};
|
|
@@ -10278,6 +10291,7 @@ var BABYLON;
|
|
newPromise._onRejected = onRejected;
|
|
newPromise._onRejected = onRejected;
|
|
// Composition
|
|
// Composition
|
|
this._children.push(newPromise);
|
|
this._children.push(newPromise);
|
|
|
|
+ newPromise._parent = this;
|
|
if (this._state !== PromiseStates.Pending) {
|
|
if (this._state !== PromiseStates.Pending) {
|
|
BABYLON.Tools.SetImmediate(function () {
|
|
BABYLON.Tools.SetImmediate(function () {
|
|
if (_this._state === PromiseStates.Fulfilled || _this._rejectWasConsumed) {
|
|
if (_this._state === PromiseStates.Fulfilled || _this._rejectWasConsumed) {
|
|
@@ -10286,6 +10300,7 @@ var BABYLON;
|
|
if (returnedValue._state !== undefined) {
|
|
if (returnedValue._state !== undefined) {
|
|
var returnedPromise = returnedValue;
|
|
var returnedPromise = returnedValue;
|
|
newPromise._children.push(returnedPromise);
|
|
newPromise._children.push(returnedPromise);
|
|
|
|
+ returnedPromise._parent = newPromise;
|
|
newPromise = returnedPromise;
|
|
newPromise = returnedPromise;
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
@@ -10301,7 +10316,11 @@ var BABYLON;
|
|
return newPromise;
|
|
return newPromise;
|
|
};
|
|
};
|
|
InternalPromise.prototype._moveChildren = function (children) {
|
|
InternalPromise.prototype._moveChildren = function (children) {
|
|
|
|
+ var _this = this;
|
|
(_a = this._children).push.apply(_a, children.splice(0, children.length));
|
|
(_a = this._children).push.apply(_a, children.splice(0, children.length));
|
|
|
|
+ this._children.forEach(function (child) {
|
|
|
|
+ child._parent = _this;
|
|
|
|
+ });
|
|
if (this._state === PromiseStates.Fulfilled) {
|
|
if (this._state === PromiseStates.Fulfilled) {
|
|
for (var _i = 0, _b = this._children; _i < _b.length; _i++) {
|
|
for (var _i = 0, _b = this._children; _i < _b.length; _i++) {
|
|
var child = _b[_i];
|
|
var child = _b[_i];
|
|
@@ -10327,6 +10346,7 @@ var BABYLON;
|
|
if (returnedValue._state !== undefined) {
|
|
if (returnedValue._state !== undefined) {
|
|
// Transmit children
|
|
// Transmit children
|
|
var returnedPromise = returnedValue;
|
|
var returnedPromise = returnedValue;
|
|
|
|
+ returnedPromise._parent = this;
|
|
returnedPromise._moveChildren(this._children);
|
|
returnedPromise._moveChildren(this._children);
|
|
value = returnedPromise._result;
|
|
value = returnedPromise._result;
|
|
}
|
|
}
|
|
@@ -106288,7 +106308,9 @@ var BABYLON;
|
|
GLTFLoader.prototype._loadAnimationChannelAsync = function (context, animationContext, animation, channel, babylonAnimationGroup) {
|
|
GLTFLoader.prototype._loadAnimationChannelAsync = function (context, animationContext, animation, channel, babylonAnimationGroup) {
|
|
var _this = this;
|
|
var _this = this;
|
|
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);
|
|
- if (!targetNode._babylonMesh) {
|
|
|
|
|
|
+ // Ignore animations that have no animation targets.
|
|
|
|
+ if ((channel.target.path === "weights" /* WEIGHTS */ && !targetNode._numMorphTargets) ||
|
|
|
|
+ (channel.target.path !== "weights" /* WEIGHTS */ && !targetNode._babylonAnimationTargets)) {
|
|
return Promise.resolve();
|
|
return Promise.resolve();
|
|
}
|
|
}
|
|
// Ignore animations targeting TRS of skinned nodes.
|
|
// Ignore animations targeting TRS of skinned nodes.
|