|
@@ -86,9 +86,7 @@ var BabylonViewer =
|
|
/* 0 */
|
|
/* 0 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
-/* WEBPACK VAR INJECTION */(function(global) {var __decorate=this&&this.__decorate||function(e,t,r,c){var o,f=arguments.length,n=f<3?t:null===c?c=Object.getOwnPropertyDescriptor(t,r):c;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,c);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(n=(f<3?o(n):f>3?o(t,r,n):o(t,r))||n);return f>3&&n&&Object.defineProperty(t,r,n),n};
|
|
|
|
-var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var n in o)o.hasOwnProperty(n)&&(t[n]=o[n])};return function(o,n){function r(){this.constructor=o}t(o,n),o.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();
|
|
|
|
-
|
|
|
|
|
|
+/* WEBPACK VAR INJECTION */(function(global) {
|
|
|
|
|
|
(function universalModuleDefinition(root, factory) {
|
|
(function universalModuleDefinition(root, factory) {
|
|
var amdDependencies = [];
|
|
var amdDependencies = [];
|
|
@@ -121,6 +119,8 @@ var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__p
|
|
OIMO = OIMO || this.OIMO;
|
|
OIMO = OIMO || this.OIMO;
|
|
earcut = earcut || this.earcut;
|
|
earcut = earcut || this.earcut;
|
|
|
|
|
|
|
|
+var __decorate=this&&this.__decorate||function(e,t,r,c){var o,f=arguments.length,n=f<3?t:null===c?c=Object.getOwnPropertyDescriptor(t,r):c;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,c);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(n=(f<3?o(n):f>3?o(t,r,n):o(t,r))||n);return f>3&&n&&Object.defineProperty(t,r,n),n};
|
|
|
|
+var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var n in o)o.hasOwnProperty(n)&&(t[n]=o[n])};return function(o,n){function r(){this.constructor=o}t(o,n),o.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();
|
|
"use strict";
|
|
"use strict";
|
|
var BABYLON;
|
|
var BABYLON;
|
|
(function (BABYLON) {
|
|
(function (BABYLON) {
|
|
@@ -4812,7 +4812,6 @@ var BABYLON;
|
|
Quaternion.SlerpToRef = function (left, right, amount, result) {
|
|
Quaternion.SlerpToRef = function (left, right, amount, result) {
|
|
var num2;
|
|
var num2;
|
|
var num3;
|
|
var num3;
|
|
- var num = amount;
|
|
|
|
var num4 = (((left.x * right.x) + (left.y * right.y)) + (left.z * right.z)) + (left.w * right.w);
|
|
var num4 = (((left.x * right.x) + (left.y * right.y)) + (left.z * right.z)) + (left.w * right.w);
|
|
var flag = false;
|
|
var flag = false;
|
|
if (num4 < 0) {
|
|
if (num4 < 0) {
|
|
@@ -4820,14 +4819,14 @@ var BABYLON;
|
|
num4 = -num4;
|
|
num4 = -num4;
|
|
}
|
|
}
|
|
if (num4 > 0.999999) {
|
|
if (num4 > 0.999999) {
|
|
- num3 = 1 - num;
|
|
|
|
- num2 = flag ? -num : num;
|
|
|
|
|
|
+ num3 = 1 - amount;
|
|
|
|
+ num2 = flag ? -amount : amount;
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
var num5 = Math.acos(num4);
|
|
var num5 = Math.acos(num4);
|
|
var num6 = (1.0 / Math.sin(num5));
|
|
var num6 = (1.0 / Math.sin(num5));
|
|
- num3 = (Math.sin((1.0 - num) * num5)) * num6;
|
|
|
|
- num2 = flag ? ((-Math.sin(num * num5)) * num6) : ((Math.sin(num * num5)) * num6);
|
|
|
|
|
|
+ num3 = (Math.sin((1.0 - amount) * num5)) * num6;
|
|
|
|
+ num2 = flag ? ((-Math.sin(amount * num5)) * num6) : ((Math.sin(amount * num5)) * num6);
|
|
}
|
|
}
|
|
result.x = (num3 * left.x) + (num2 * right.x);
|
|
result.x = (num3 * left.x) + (num2 * right.x);
|
|
result.y = (num3 * left.y) + (num2 * right.y);
|
|
result.y = (num3 * left.y) + (num2 * right.y);
|
|
@@ -5253,24 +5252,28 @@ var BABYLON;
|
|
* @returns true if operation was successful
|
|
* @returns true if operation was successful
|
|
*/
|
|
*/
|
|
Matrix.prototype.decompose = function (scale, rotation, translation) {
|
|
Matrix.prototype.decompose = function (scale, rotation, translation) {
|
|
- translation.x = this.m[12];
|
|
|
|
- translation.y = this.m[13];
|
|
|
|
- translation.z = this.m[14];
|
|
|
|
|
|
+ if (translation) {
|
|
|
|
+ translation.x = this.m[12];
|
|
|
|
+ translation.y = this.m[13];
|
|
|
|
+ translation.z = this.m[14];
|
|
|
|
+ }
|
|
scale.x = Math.sqrt(this.m[0] * this.m[0] + this.m[1] * this.m[1] + this.m[2] * this.m[2]);
|
|
scale.x = Math.sqrt(this.m[0] * this.m[0] + this.m[1] * this.m[1] + this.m[2] * this.m[2]);
|
|
scale.y = Math.sqrt(this.m[4] * this.m[4] + this.m[5] * this.m[5] + this.m[6] * this.m[6]);
|
|
scale.y = Math.sqrt(this.m[4] * this.m[4] + this.m[5] * this.m[5] + this.m[6] * this.m[6]);
|
|
scale.z = Math.sqrt(this.m[8] * this.m[8] + this.m[9] * this.m[9] + this.m[10] * this.m[10]);
|
|
scale.z = Math.sqrt(this.m[8] * this.m[8] + this.m[9] * this.m[9] + this.m[10] * this.m[10]);
|
|
if (this.determinant() <= 0) {
|
|
if (this.determinant() <= 0) {
|
|
scale.y *= -1;
|
|
scale.y *= -1;
|
|
}
|
|
}
|
|
- if (scale.x === 0 || scale.y === 0 || scale.z === 0) {
|
|
|
|
- rotation.x = 0;
|
|
|
|
- rotation.y = 0;
|
|
|
|
- rotation.z = 0;
|
|
|
|
- rotation.w = 1;
|
|
|
|
- return false;
|
|
|
|
|
|
+ if (rotation) {
|
|
|
|
+ if (scale.x === 0 || scale.y === 0 || scale.z === 0) {
|
|
|
|
+ rotation.x = 0;
|
|
|
|
+ rotation.y = 0;
|
|
|
|
+ rotation.z = 0;
|
|
|
|
+ rotation.w = 1;
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ Matrix.FromValuesToRef(this.m[0] / scale.x, this.m[1] / scale.x, this.m[2] / scale.x, 0, this.m[4] / scale.y, this.m[5] / scale.y, this.m[6] / scale.y, 0, this.m[8] / scale.z, this.m[9] / scale.z, this.m[10] / scale.z, 0, 0, 0, 0, 1, MathTmp.Matrix[0]);
|
|
|
|
+ Quaternion.FromRotationMatrixToRef(MathTmp.Matrix[0], rotation);
|
|
}
|
|
}
|
|
- Matrix.FromValuesToRef(this.m[0] / scale.x, this.m[1] / scale.x, this.m[2] / scale.x, 0, this.m[4] / scale.y, this.m[5] / scale.y, this.m[6] / scale.y, 0, this.m[8] / scale.z, this.m[9] / scale.z, this.m[10] / scale.z, 0, 0, 0, 0, 1, MathTmp.Matrix[0]);
|
|
|
|
- Quaternion.FromRotationMatrixToRef(MathTmp.Matrix[0], rotation);
|
|
|
|
return true;
|
|
return true;
|
|
};
|
|
};
|
|
/**
|
|
/**
|
|
@@ -5860,18 +5863,36 @@ var BABYLON;
|
|
* @returns the new matrix
|
|
* @returns the new matrix
|
|
*/
|
|
*/
|
|
Matrix.DecomposeLerp = function (startValue, endValue, gradient) {
|
|
Matrix.DecomposeLerp = function (startValue, endValue, gradient) {
|
|
- var startScale = new Vector3(0, 0, 0);
|
|
|
|
- var startRotation = new Quaternion();
|
|
|
|
- var startTranslation = new Vector3(0, 0, 0);
|
|
|
|
|
|
+ var result = Matrix.Zero();
|
|
|
|
+ Matrix.DecomposeLerpToRef(startValue, endValue, gradient, result);
|
|
|
|
+ return result;
|
|
|
|
+ };
|
|
|
|
+ /**
|
|
|
|
+ * Update a matrix to values which are computed by:
|
|
|
|
+ * * decomposing the the "startValue" and "endValue" matrices into their respective scale, rotation and translation matrices
|
|
|
|
+ * * interpolating for "gradient" (float) the values between each of these decomposed matrices between the start and the end
|
|
|
|
+ * * recomposing a new matrix from these 3 interpolated scale, rotation and translation matrices
|
|
|
|
+ * @param startValue defines the first matrix
|
|
|
|
+ * @param endValue defines the second matrix
|
|
|
|
+ * @param gradient defines the gradient between the two matrices
|
|
|
|
+ * @param result defines the target matrix
|
|
|
|
+ */
|
|
|
|
+ Matrix.DecomposeLerpToRef = function (startValue, endValue, gradient, result) {
|
|
|
|
+ var startScale = MathTmp.Vector3[0];
|
|
|
|
+ var startRotation = MathTmp.Quaternion[0];
|
|
|
|
+ var startTranslation = MathTmp.Vector3[1];
|
|
startValue.decompose(startScale, startRotation, startTranslation);
|
|
startValue.decompose(startScale, startRotation, startTranslation);
|
|
- var endScale = new Vector3(0, 0, 0);
|
|
|
|
- var endRotation = new Quaternion();
|
|
|
|
- var endTranslation = new Vector3(0, 0, 0);
|
|
|
|
|
|
+ var endScale = MathTmp.Vector3[2];
|
|
|
|
+ var endRotation = MathTmp.Quaternion[1];
|
|
|
|
+ var endTranslation = MathTmp.Vector3[3];
|
|
endValue.decompose(endScale, endRotation, endTranslation);
|
|
endValue.decompose(endScale, endRotation, endTranslation);
|
|
- var resultScale = Vector3.Lerp(startScale, endScale, gradient);
|
|
|
|
- var resultRotation = Quaternion.Slerp(startRotation, endRotation, gradient);
|
|
|
|
- var resultTranslation = Vector3.Lerp(startTranslation, endTranslation, gradient);
|
|
|
|
- return Matrix.Compose(resultScale, resultRotation, resultTranslation);
|
|
|
|
|
|
+ var resultScale = MathTmp.Vector3[4];
|
|
|
|
+ Vector3.LerpToRef(startScale, endScale, gradient, resultScale);
|
|
|
|
+ var resultRotation = MathTmp.Quaternion[2];
|
|
|
|
+ Quaternion.SlerpToRef(startRotation, endRotation, gradient, resultRotation);
|
|
|
|
+ var resultTranslation = MathTmp.Vector3[5];
|
|
|
|
+ Vector3.LerpToRef(startTranslation, endTranslation, gradient, resultTranslation);
|
|
|
|
+ Matrix.ComposeToRef(resultScale, resultRotation, resultTranslation, result);
|
|
};
|
|
};
|
|
/**
|
|
/**
|
|
* Gets a new rotation matrix used to rotate an entity so as it looks at the target vector3, from the eye vector3 position, the up vector3 being oriented like "up"
|
|
* Gets a new rotation matrix used to rotate an entity so as it looks at the target vector3, from the eye vector3 position, the up vector3 being oriented like "up"
|
|
@@ -7193,9 +7214,9 @@ var BABYLON;
|
|
var MathTmp = /** @class */ (function () {
|
|
var MathTmp = /** @class */ (function () {
|
|
function MathTmp() {
|
|
function MathTmp() {
|
|
}
|
|
}
|
|
- MathTmp.Vector3 = [Vector3.Zero()];
|
|
|
|
|
|
+ MathTmp.Vector3 = [Vector3.Zero(), Vector3.Zero(), Vector3.Zero(), Vector3.Zero(), Vector3.Zero(), Vector3.Zero()];
|
|
MathTmp.Matrix = [Matrix.Zero(), Matrix.Zero()];
|
|
MathTmp.Matrix = [Matrix.Zero(), Matrix.Zero()];
|
|
- MathTmp.Quaternion = [Quaternion.Zero()];
|
|
|
|
|
|
+ MathTmp.Quaternion = [Quaternion.Zero(), Quaternion.Zero(), Quaternion.Zero()];
|
|
return MathTmp;
|
|
return MathTmp;
|
|
}());
|
|
}());
|
|
})(BABYLON || (BABYLON = {}));
|
|
})(BABYLON || (BABYLON = {}));
|
|
@@ -25410,16 +25431,22 @@ var BABYLON;
|
|
var target = this._registeredForLateAnimationBindings.data[index];
|
|
var target = this._registeredForLateAnimationBindings.data[index];
|
|
for (var path in target._lateAnimationHolders) {
|
|
for (var path in target._lateAnimationHolders) {
|
|
var holder = target._lateAnimationHolders[path];
|
|
var holder = target._lateAnimationHolders[path];
|
|
|
|
+ var originalValue = holder.animations[0].originalValue;
|
|
// Sanity check
|
|
// Sanity check
|
|
- if (!holder.animations[0].originalValue.scaleAndAddToRef) {
|
|
|
|
|
|
+ if (!originalValue.scaleAndAddToRef) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
+ var matrixDecomposeMode = BABYLON.Animation.AllowMatrixDecomposeForInterpolation && originalValue.m; // ie. data is matrix
|
|
var normalizer = 1.0;
|
|
var normalizer = 1.0;
|
|
var finalValue = void 0;
|
|
var finalValue = void 0;
|
|
if (holder.totalWeight < 1.0) {
|
|
if (holder.totalWeight < 1.0) {
|
|
- // We need to mix the original value in
|
|
|
|
- var originalValue = holder.animations[0].originalValue;
|
|
|
|
- finalValue = originalValue.scale(1.0 - holder.totalWeight);
|
|
|
|
|
|
+ // We need to mix the original value in
|
|
|
|
+ if (matrixDecomposeMode) {
|
|
|
|
+ finalValue = originalValue.clone();
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ finalValue = originalValue.scale(1.0 - holder.totalWeight);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
// We need to normalize the weights
|
|
// We need to normalize the weights
|
|
@@ -25427,11 +25454,27 @@ var BABYLON;
|
|
}
|
|
}
|
|
for (var animIndex = 0; animIndex < holder.animations.length; animIndex++) {
|
|
for (var animIndex = 0; animIndex < holder.animations.length; animIndex++) {
|
|
var runtimeAnimation = holder.animations[animIndex];
|
|
var runtimeAnimation = holder.animations[animIndex];
|
|
|
|
+ var scale = runtimeAnimation.weight / normalizer;
|
|
if (finalValue) {
|
|
if (finalValue) {
|
|
- runtimeAnimation.currentValue.scaleAndAddToRef(runtimeAnimation.weight / normalizer, finalValue);
|
|
|
|
|
|
+ if (matrixDecomposeMode) {
|
|
|
|
+ BABYLON.Matrix.DecomposeLerpToRef(finalValue, runtimeAnimation.currentValue, scale, finalValue);
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ runtimeAnimation.currentValue.scaleAndAddToRef(scale, finalValue);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- finalValue = runtimeAnimation.currentValue.scale(runtimeAnimation.weight / normalizer);
|
|
|
|
|
|
+ if (scale !== 1) {
|
|
|
|
+ if (matrixDecomposeMode) {
|
|
|
|
+ finalValue = runtimeAnimation.currentValue.clone();
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ finalValue = runtimeAnimation.currentValue.scale(scale);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ finalValue = runtimeAnimation.currentValue;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
runtimeAnimation.target[path] = finalValue;
|
|
runtimeAnimation.target[path] = finalValue;
|
|
@@ -25745,6 +25788,18 @@ var BABYLON;
|
|
return index;
|
|
return index;
|
|
};
|
|
};
|
|
/**
|
|
/**
|
|
|
|
+ * Removes the given effect layer from this scene.
|
|
|
|
+ * @param toRemove defines the effect layer to remove
|
|
|
|
+ * @returns the index of the removed effect layer
|
|
|
|
+ */
|
|
|
|
+ Scene.prototype.removeEffectLayer = function (toRemove) {
|
|
|
|
+ var index = this.effectLayers.indexOf(toRemove);
|
|
|
|
+ if (index !== -1) {
|
|
|
|
+ this.effectLayers.splice(index, 1);
|
|
|
|
+ }
|
|
|
|
+ return index;
|
|
|
|
+ };
|
|
|
|
+ /**
|
|
* Removes the given texture from this scene.
|
|
* Removes the given texture from this scene.
|
|
* @param toRemove The texture to remove
|
|
* @param toRemove The texture to remove
|
|
* @returns The index of the removed texture
|
|
* @returns The index of the removed texture
|
|
@@ -25853,6 +25908,13 @@ var BABYLON;
|
|
this.lensFlareSystems.push(newLensFlareSystem);
|
|
this.lensFlareSystems.push(newLensFlareSystem);
|
|
};
|
|
};
|
|
/**
|
|
/**
|
|
|
|
+ * Adds the given effect layer to this scene
|
|
|
|
+ * @param newEffectLayer defines the effect layer to add
|
|
|
|
+ */
|
|
|
|
+ Scene.prototype.addEffectLayer = function (newEffectLayer) {
|
|
|
|
+ this.effectLayers.push(newEffectLayer);
|
|
|
|
+ };
|
|
|
|
+ /**
|
|
* Adds the given action manager to this scene
|
|
* Adds the given action manager to this scene
|
|
* @param newActionManager The action manager to add
|
|
* @param newActionManager The action manager to add
|
|
*/
|
|
*/
|
|
@@ -26932,7 +26994,10 @@ var BABYLON;
|
|
action._executeCurrent(BABYLON.ActionEvent.CreateNew(sourceMesh, undefined, otherMesh));
|
|
action._executeCurrent(BABYLON.ActionEvent.CreateNew(sourceMesh, undefined, otherMesh));
|
|
}
|
|
}
|
|
//if this is an exit trigger, or no exit trigger exists, remove the id from the intersection in progress array.
|
|
//if this is an exit trigger, or no exit trigger exists, remove the id from the intersection in progress array.
|
|
- if (!sourceMesh.actionManager.hasSpecificTrigger(BABYLON.ActionManager.OnIntersectionExitTrigger) || action.trigger === BABYLON.ActionManager.OnIntersectionExitTrigger) {
|
|
|
|
|
|
+ if (!sourceMesh.actionManager.hasSpecificTrigger(BABYLON.ActionManager.OnIntersectionExitTrigger, function (parameter) {
|
|
|
|
+ var parameterMesh = parameter instanceof BABYLON.AbstractMesh ? parameter : parameter.mesh;
|
|
|
|
+ return otherMesh === parameterMesh;
|
|
|
|
+ }) || action.trigger === BABYLON.ActionManager.OnIntersectionExitTrigger) {
|
|
sourceMesh._intersectionsInProgress.splice(currentIntersectionInProgress, 1);
|
|
sourceMesh._intersectionsInProgress.splice(currentIntersectionInProgress, 1);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -28341,6 +28406,10 @@ var BABYLON;
|
|
* Textures to keep.
|
|
* Textures to keep.
|
|
*/
|
|
*/
|
|
this.textures = new Array();
|
|
this.textures = new Array();
|
|
|
|
+ /**
|
|
|
|
+ * Effect layers to keep.
|
|
|
|
+ */
|
|
|
|
+ this.effectLayers = new Array();
|
|
}
|
|
}
|
|
return KeepAssets;
|
|
return KeepAssets;
|
|
}());
|
|
}());
|
|
@@ -28423,6 +28492,10 @@ var BABYLON;
|
|
* Textures populated in the container.
|
|
* Textures populated in the container.
|
|
*/
|
|
*/
|
|
this.textures = new Array();
|
|
this.textures = new Array();
|
|
|
|
+ /**
|
|
|
|
+ * Effect layers populated in the container.
|
|
|
|
+ */
|
|
|
|
+ this.effectLayers = new Array();
|
|
this.scene = scene;
|
|
this.scene = scene;
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
@@ -28478,7 +28551,10 @@ var BABYLON;
|
|
_this.scene.mainSoundTrack.AddSound(o);
|
|
_this.scene.mainSoundTrack.AddSound(o);
|
|
});
|
|
});
|
|
this.textures.forEach(function (o) {
|
|
this.textures.forEach(function (o) {
|
|
- _this.scene.addTexture;
|
|
|
|
|
|
+ _this.scene.addTexture(o);
|
|
|
|
+ });
|
|
|
|
+ this.effectLayers.forEach(function (o) {
|
|
|
|
+ _this.scene.addEffectLayer(o);
|
|
});
|
|
});
|
|
};
|
|
};
|
|
/**
|
|
/**
|
|
@@ -28536,6 +28612,9 @@ var BABYLON;
|
|
this.textures.forEach(function (o) {
|
|
this.textures.forEach(function (o) {
|
|
_this.scene.removeTexture(o);
|
|
_this.scene.removeTexture(o);
|
|
});
|
|
});
|
|
|
|
+ this.effectLayers.forEach(function (o) {
|
|
|
|
+ _this.scene.removeEffectLayer(o);
|
|
|
|
+ });
|
|
};
|
|
};
|
|
AssetContainer.prototype._moveAssets = function (sourceAssets, targetAssets, keepAssets) {
|
|
AssetContainer.prototype._moveAssets = function (sourceAssets, targetAssets, keepAssets) {
|
|
for (var _i = 0, sourceAssets_1 = sourceAssets; _i < sourceAssets_1.length; _i++) {
|
|
for (var _i = 0, sourceAssets_1 = sourceAssets; _i < sourceAssets_1.length; _i++) {
|
|
@@ -28577,6 +28656,7 @@ var BABYLON;
|
|
this._moveAssets(this.scene.mainSoundTrack.soundCollection, this.sounds, keepAssets.sounds);
|
|
this._moveAssets(this.scene.mainSoundTrack.soundCollection, this.sounds, keepAssets.sounds);
|
|
this._moveAssets(this.scene.transformNodes, this.transformNodes, keepAssets.transformNodes);
|
|
this._moveAssets(this.scene.transformNodes, this.transformNodes, keepAssets.transformNodes);
|
|
this._moveAssets(this.scene.textures, this.textures, keepAssets.textures);
|
|
this._moveAssets(this.scene.textures, this.textures, keepAssets.textures);
|
|
|
|
+ this._moveAssets(this.scene.effectLayers, this.effectLayers, keepAssets.effectLayers);
|
|
this.removeAllFromScene();
|
|
this.removeAllFromScene();
|
|
};
|
|
};
|
|
return AssetContainer;
|
|
return AssetContainer;
|
|
@@ -49967,6 +50047,9 @@ var BABYLON;
|
|
return BABYLON.Color3.Lerp(startValue, endValue, gradient);
|
|
return BABYLON.Color3.Lerp(startValue, endValue, gradient);
|
|
};
|
|
};
|
|
Animation.prototype.matrixInterpolateFunction = function (startValue, endValue, gradient) {
|
|
Animation.prototype.matrixInterpolateFunction = function (startValue, endValue, gradient) {
|
|
|
|
+ if (Animation.AllowMatrixDecomposeForInterpolation) {
|
|
|
|
+ return BABYLON.Matrix.DecomposeLerp(startValue, endValue, gradient);
|
|
|
|
+ }
|
|
return BABYLON.Matrix.Lerp(startValue, endValue, gradient);
|
|
return BABYLON.Matrix.Lerp(startValue, endValue, gradient);
|
|
};
|
|
};
|
|
Animation.prototype.clone = function () {
|
|
Animation.prototype.clone = function () {
|
|
@@ -50185,7 +50268,14 @@ var BABYLON;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
+ /**
|
|
|
|
+ * Use matrix interpolation instead of using direct key value when animating matrices
|
|
|
|
+ */
|
|
Animation.AllowMatricesInterpolation = false;
|
|
Animation.AllowMatricesInterpolation = false;
|
|
|
|
+ /**
|
|
|
|
+ * When matrix interpolation is enabled, this boolean forces the system to use Matrix.DecomposeLerp instead of Matrix.Lerp. Interpolation is more precise but slower
|
|
|
|
+ */
|
|
|
|
+ Animation.AllowMatrixDecomposeForInterpolation = true;
|
|
// Statics
|
|
// Statics
|
|
Animation._ANIMATIONTYPE_FLOAT = 0;
|
|
Animation._ANIMATIONTYPE_FLOAT = 0;
|
|
Animation._ANIMATIONTYPE_VECTOR3 = 1;
|
|
Animation._ANIMATIONTYPE_VECTOR3 = 1;
|
|
@@ -50782,7 +50872,22 @@ var BABYLON;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else if (this._originalBlendValue.m) {
|
|
else if (this._originalBlendValue.m) {
|
|
- this._currentValue = BABYLON.Matrix.Lerp(this._originalBlendValue, currentValue, this._blendingFactor);
|
|
|
|
|
|
+ if (BABYLON.Animation.AllowMatrixDecomposeForInterpolation) {
|
|
|
|
+ if (this._currentValue) {
|
|
|
|
+ BABYLON.Matrix.DecomposeLerpToRef(this._originalBlendValue, currentValue, this._blendingFactor, this._currentValue);
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ this._currentValue = BABYLON.Matrix.DecomposeLerp(this._originalBlendValue, currentValue, this._blendingFactor);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ if (this._currentValue) {
|
|
|
|
+ BABYLON.Matrix.LerpToRef(this._originalBlendValue, currentValue, this._blendingFactor, this._currentValue);
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ this._currentValue = BABYLON.Matrix.Lerp(this._originalBlendValue, currentValue, this._blendingFactor);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
this._currentValue = this._originalBlendValue * (1.0 - this._blendingFactor) + this._blendingFactor * currentValue;
|
|
this._currentValue = this._originalBlendValue * (1.0 - this._blendingFactor) + this._blendingFactor * currentValue;
|
|
@@ -52193,14 +52298,22 @@ var BABYLON;
|
|
};
|
|
};
|
|
/**
|
|
/**
|
|
* Does this action manager handles actions of a given trigger
|
|
* Does this action manager handles actions of a given trigger
|
|
- * @param {number} trigger - the trigger to be tested
|
|
|
|
- * @return {boolean} whether the trigger is handeled
|
|
|
|
|
|
+ * @param trigger defines the trigger to be tested
|
|
|
|
+ * @param parameterPredicate defines an optional predicate to filter triggers by parameter
|
|
|
|
+ * @return whether the trigger is handled
|
|
*/
|
|
*/
|
|
- ActionManager.prototype.hasSpecificTrigger = function (trigger) {
|
|
|
|
|
|
+ ActionManager.prototype.hasSpecificTrigger = function (trigger, parameterPredicate) {
|
|
for (var index = 0; index < this.actions.length; index++) {
|
|
for (var index = 0; index < this.actions.length; index++) {
|
|
var action = this.actions[index];
|
|
var action = this.actions[index];
|
|
if (action.trigger === trigger) {
|
|
if (action.trigger === trigger) {
|
|
- return true;
|
|
|
|
|
|
+ if (parameterPredicate) {
|
|
|
|
+ if (parameterPredicate(action.getTriggerParameter())) {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
return false;
|
|
@@ -61821,6 +61934,11 @@ var BABYLON;
|
|
|
|
|
|
"use strict";
|
|
"use strict";
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
var BABYLON;
|
|
var BABYLON;
|
|
(function (BABYLON) {
|
|
(function (BABYLON) {
|
|
var CubeTexture = /** @class */ (function (_super) {
|
|
var CubeTexture = /** @class */ (function (_super) {
|
|
@@ -61841,6 +61959,7 @@ var BABYLON;
|
|
* It must define where the camera used to render the texture was set
|
|
* It must define where the camera used to render the texture was set
|
|
*/
|
|
*/
|
|
_this.boundingBoxPosition = BABYLON.Vector3.Zero();
|
|
_this.boundingBoxPosition = BABYLON.Vector3.Zero();
|
|
|
|
+ _this._rotationY = 0;
|
|
_this.name = rootUrl;
|
|
_this.name = rootUrl;
|
|
_this.url = rootUrl;
|
|
_this.url = rootUrl;
|
|
_this._noMipmap = noMipmap;
|
|
_this._noMipmap = noMipmap;
|
|
@@ -61917,6 +62036,23 @@ var BABYLON;
|
|
enumerable: true,
|
|
enumerable: true,
|
|
configurable: true
|
|
configurable: true
|
|
});
|
|
});
|
|
|
|
+ Object.defineProperty(CubeTexture.prototype, "rotationY", {
|
|
|
|
+ /**
|
|
|
|
+ * Gets texture matrix rotation angle around Y axis radians.
|
|
|
|
+ */
|
|
|
|
+ get: function () {
|
|
|
|
+ return this._rotationY;
|
|
|
|
+ },
|
|
|
|
+ /**
|
|
|
|
+ * Sets texture matrix rotation angle around Y axis in radians.
|
|
|
|
+ */
|
|
|
|
+ set: function (value) {
|
|
|
|
+ this._rotationY = value;
|
|
|
|
+ this.setReflectionTextureMatrix(BABYLON.Matrix.RotationY(this._rotationY));
|
|
|
|
+ },
|
|
|
|
+ enumerable: true,
|
|
|
|
+ configurable: true
|
|
|
|
+ });
|
|
CubeTexture.CreateFromImages = function (files, scene, noMipmap) {
|
|
CubeTexture.CreateFromImages = function (files, scene, noMipmap) {
|
|
var rootUrlKey = "";
|
|
var rootUrlKey = "";
|
|
files.forEach(function (url) { return rootUrlKey += url; });
|
|
files.forEach(function (url) { return rootUrlKey += url; });
|
|
@@ -61982,6 +62118,9 @@ var BABYLON;
|
|
return new CubeTexture(_this.url, scene, _this._extensions, _this._noMipmap, _this._files);
|
|
return new CubeTexture(_this.url, scene, _this._extensions, _this._noMipmap, _this._files);
|
|
}, this);
|
|
}, this);
|
|
};
|
|
};
|
|
|
|
+ __decorate([
|
|
|
|
+ BABYLON.serialize("rotationY")
|
|
|
|
+ ], CubeTexture.prototype, "_rotationY", void 0);
|
|
return CubeTexture;
|
|
return CubeTexture;
|
|
}(BABYLON.BaseTexture));
|
|
}(BABYLON.BaseTexture));
|
|
BABYLON.CubeTexture = CubeTexture;
|
|
BABYLON.CubeTexture = CubeTexture;
|
|
@@ -66517,6 +66656,13 @@ var BABYLON;
|
|
light_2._includedOnlyMeshesIds = [];
|
|
light_2._includedOnlyMeshesIds = [];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ // Effect layers
|
|
|
|
+ if (parsedData.effectLayers) {
|
|
|
|
+ for (index = 0; index < parsedData.effectLayers.length; index++) {
|
|
|
|
+ var effectLayer = BABYLON.EffectLayer.Parse(parsedData.effectLayers[index], scene, rootUrl);
|
|
|
|
+ container.effectLayers.push(effectLayer);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
// Actions (scene)
|
|
// Actions (scene)
|
|
if (parsedData.actions !== undefined && parsedData.actions !== null) {
|
|
if (parsedData.actions !== undefined && parsedData.actions !== null) {
|
|
BABYLON.ActionManager.Parse(parsedData.actions, null, scene);
|
|
BABYLON.ActionManager.Parse(parsedData.actions, null, scene);
|
|
@@ -73980,7 +74126,7 @@ var BABYLON;
|
|
return this._circleOfConfusion.focalLength;
|
|
return this._circleOfConfusion.focalLength;
|
|
},
|
|
},
|
|
/**
|
|
/**
|
|
- * The focal the length of the camera used in the effect
|
|
|
|
|
|
+ * The focal the length of the camera used in the effect in scene units/1000 (eg. millimeter)
|
|
*/
|
|
*/
|
|
set: function (value) {
|
|
set: function (value) {
|
|
this._circleOfConfusion.focalLength = value;
|
|
this._circleOfConfusion.focalLength = value;
|
|
@@ -78856,6 +79002,7 @@ var BABYLON;
|
|
*/
|
|
*/
|
|
_this.isPMREM = false;
|
|
_this.isPMREM = false;
|
|
_this._isBlocking = true;
|
|
_this._isBlocking = true;
|
|
|
|
+ _this._rotationY = 0;
|
|
/**
|
|
/**
|
|
* Gets or sets the center of the bounding box associated with the cube texture
|
|
* Gets or sets the center of the bounding box associated with the cube texture
|
|
* It must define where the camera used to render the texture was set
|
|
* It must define where the camera used to render the texture was set
|
|
@@ -78918,6 +79065,23 @@ var BABYLON;
|
|
enumerable: true,
|
|
enumerable: true,
|
|
configurable: true
|
|
configurable: true
|
|
});
|
|
});
|
|
|
|
+ Object.defineProperty(HDRCubeTexture.prototype, "rotationY", {
|
|
|
|
+ /**
|
|
|
|
+ * Gets texture matrix rotation angle around Y axis radians.
|
|
|
|
+ */
|
|
|
|
+ get: function () {
|
|
|
|
+ return this._rotationY;
|
|
|
|
+ },
|
|
|
|
+ /**
|
|
|
|
+ * Sets texture matrix rotation angle around Y axis in radians.
|
|
|
|
+ */
|
|
|
|
+ set: function (value) {
|
|
|
|
+ this._rotationY = value;
|
|
|
|
+ this.setReflectionTextureMatrix(BABYLON.Matrix.RotationY(this._rotationY));
|
|
|
|
+ },
|
|
|
|
+ enumerable: true,
|
|
|
|
+ configurable: true
|
|
|
|
+ });
|
|
Object.defineProperty(HDRCubeTexture.prototype, "boundingBoxSize", {
|
|
Object.defineProperty(HDRCubeTexture.prototype, "boundingBoxSize", {
|
|
get: function () {
|
|
get: function () {
|
|
return this._boundingBoxSize;
|
|
return this._boundingBoxSize;
|
|
@@ -79211,6 +79375,9 @@ var BABYLON;
|
|
if (parsedTexture.boundingBoxSize) {
|
|
if (parsedTexture.boundingBoxSize) {
|
|
texture.boundingBoxSize = BABYLON.Vector3.FromArray(parsedTexture.boundingBoxSize);
|
|
texture.boundingBoxSize = BABYLON.Vector3.FromArray(parsedTexture.boundingBoxSize);
|
|
}
|
|
}
|
|
|
|
+ if (parsedTexture.rotationY) {
|
|
|
|
+ texture.rotationY = parsedTexture.rotationY;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return texture;
|
|
return texture;
|
|
};
|
|
};
|
|
@@ -79232,6 +79399,7 @@ var BABYLON;
|
|
serializationObject.customType = "BABYLON.HDRCubeTexture";
|
|
serializationObject.customType = "BABYLON.HDRCubeTexture";
|
|
serializationObject.noMipmap = this._noMipmap;
|
|
serializationObject.noMipmap = this._noMipmap;
|
|
serializationObject.isBlocking = this._isBlocking;
|
|
serializationObject.isBlocking = this._isBlocking;
|
|
|
|
+ serializationObject.rotationY = this._rotationY;
|
|
return serializationObject;
|
|
return serializationObject;
|
|
};
|
|
};
|
|
/**
|
|
/**
|
|
@@ -90241,6 +90409,17 @@ var BABYLON;
|
|
EffectLayer.prototype.getClassName = function () {
|
|
EffectLayer.prototype.getClassName = function () {
|
|
return "EffectLayer";
|
|
return "EffectLayer";
|
|
};
|
|
};
|
|
|
|
+ /**
|
|
|
|
+ * Creates an effect layer from parsed effect layer data
|
|
|
|
+ * @param parsedEffectLayer defines effect layer data
|
|
|
|
+ * @param scene defines the current scene
|
|
|
|
+ * @param rootUrl defines the root URL containing the effect layer information
|
|
|
|
+ * @returns a parsed effect Layer
|
|
|
|
+ */
|
|
|
|
+ EffectLayer.Parse = function (parsedEffectLayer, scene, rootUrl) {
|
|
|
|
+ var effectLayerType = BABYLON.Tools.Instantiate(parsedEffectLayer.customType);
|
|
|
|
+ return effectLayerType.Parse(parsedEffectLayer, scene, rootUrl);
|
|
|
|
+ };
|
|
__decorate([
|
|
__decorate([
|
|
BABYLON.serialize()
|
|
BABYLON.serialize()
|
|
], EffectLayer.prototype, "name", void 0);
|
|
], EffectLayer.prototype, "name", void 0);
|
|
@@ -90728,6 +90907,73 @@ var BABYLON;
|
|
_super.prototype.dispose.call(this);
|
|
_super.prototype.dispose.call(this);
|
|
};
|
|
};
|
|
/**
|
|
/**
|
|
|
|
+ * Gets the class name of the effect layer
|
|
|
|
+ * @returns the string with the class name of the effect layer
|
|
|
|
+ */
|
|
|
|
+ HighlightLayer.prototype.getClassName = function () {
|
|
|
|
+ return "HighlightLayer";
|
|
|
|
+ };
|
|
|
|
+ /**
|
|
|
|
+ * Serializes this Highlight layer
|
|
|
|
+ * @returns a serialized Highlight layer object
|
|
|
|
+ */
|
|
|
|
+ HighlightLayer.prototype.serialize = function () {
|
|
|
|
+ var serializationObject = BABYLON.SerializationHelper.Serialize(this);
|
|
|
|
+ serializationObject.customType = "BABYLON.HighlightLayer";
|
|
|
|
+ // Highlighted meshes
|
|
|
|
+ serializationObject.meshes = [];
|
|
|
|
+ if (this._meshes) {
|
|
|
|
+ for (var m in this._meshes) {
|
|
|
|
+ var mesh = this._meshes[m];
|
|
|
|
+ if (mesh) {
|
|
|
|
+ serializationObject.meshes.push({
|
|
|
|
+ glowEmissiveOnly: mesh.glowEmissiveOnly,
|
|
|
|
+ color: mesh.color.asArray(),
|
|
|
|
+ meshId: mesh.mesh.id
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // Excluded meshes
|
|
|
|
+ serializationObject.excludedMeshes = [];
|
|
|
|
+ if (this._excludedMeshes) {
|
|
|
|
+ for (var e in this._excludedMeshes) {
|
|
|
|
+ var excludedMesh = this._excludedMeshes[e];
|
|
|
|
+ if (excludedMesh) {
|
|
|
|
+ serializationObject.excludedMeshes.push(excludedMesh.mesh.id);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return serializationObject;
|
|
|
|
+ };
|
|
|
|
+ /**
|
|
|
|
+ * Creates a Highlight layer from parsed Highlight layer data
|
|
|
|
+ * @param parsedHightlightLayer defines the Highlight layer data
|
|
|
|
+ * @param scene defines the current scene
|
|
|
|
+ * @param rootUrl defines the root URL containing the Highlight layer information
|
|
|
|
+ * @returns a parsed Highlight layer
|
|
|
|
+ */
|
|
|
|
+ HighlightLayer.Parse = function (parsedHightlightLayer, scene, rootUrl) {
|
|
|
|
+ var hl = BABYLON.SerializationHelper.Parse(function () { return new HighlightLayer(parsedHightlightLayer.name, scene, parsedHightlightLayer.options); }, parsedHightlightLayer, scene, rootUrl);
|
|
|
|
+ var index;
|
|
|
|
+ // Excluded meshes
|
|
|
|
+ for (index = 0; index < parsedHightlightLayer.excludedMeshes.length; index++) {
|
|
|
|
+ var mesh = scene.getMeshByID(parsedHightlightLayer.excludedMeshes[index]);
|
|
|
|
+ if (mesh) {
|
|
|
|
+ hl.addExcludedMesh(mesh);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // Included meshes
|
|
|
|
+ for (index = 0; index < parsedHightlightLayer.meshes.length; index++) {
|
|
|
|
+ var highlightedMesh = parsedHightlightLayer.meshes[index];
|
|
|
|
+ var mesh = scene.getMeshByID(highlightedMesh.meshId);
|
|
|
|
+ if (mesh) {
|
|
|
|
+ hl.addMesh(mesh, BABYLON.Color3.FromArray(highlightedMesh.color), highlightedMesh.glowEmissiveOnly);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return hl;
|
|
|
|
+ };
|
|
|
|
+ /**
|
|
* Effect Name of the highlight layer.
|
|
* Effect Name of the highlight layer.
|
|
*/
|
|
*/
|
|
HighlightLayer.EffectName = "HighlightLayer";
|
|
HighlightLayer.EffectName = "HighlightLayer";
|
|
@@ -90744,6 +90990,21 @@ var BABYLON;
|
|
* Stencil value used for the other meshes in the scene.
|
|
* Stencil value used for the other meshes in the scene.
|
|
*/
|
|
*/
|
|
HighlightLayer.NormalMeshStencilReference = 0x01;
|
|
HighlightLayer.NormalMeshStencilReference = 0x01;
|
|
|
|
+ __decorate([
|
|
|
|
+ BABYLON.serialize()
|
|
|
|
+ ], HighlightLayer.prototype, "innerGlow", void 0);
|
|
|
|
+ __decorate([
|
|
|
|
+ BABYLON.serialize()
|
|
|
|
+ ], HighlightLayer.prototype, "outerGlow", void 0);
|
|
|
|
+ __decorate([
|
|
|
|
+ BABYLON.serialize()
|
|
|
|
+ ], HighlightLayer.prototype, "blurHorizontalSize", null);
|
|
|
|
+ __decorate([
|
|
|
|
+ BABYLON.serialize()
|
|
|
|
+ ], HighlightLayer.prototype, "blurVerticalSize", null);
|
|
|
|
+ __decorate([
|
|
|
|
+ BABYLON.serialize("options")
|
|
|
|
+ ], HighlightLayer.prototype, "_options", void 0);
|
|
return HighlightLayer;
|
|
return HighlightLayer;
|
|
}(BABYLON.EffectLayer));
|
|
}(BABYLON.EffectLayer));
|
|
BABYLON.HighlightLayer = HighlightLayer;
|
|
BABYLON.HighlightLayer = HighlightLayer;
|
|
@@ -91080,6 +91341,7 @@ var BABYLON;
|
|
*/
|
|
*/
|
|
GlowLayer.prototype.serialize = function () {
|
|
GlowLayer.prototype.serialize = function () {
|
|
var serializationObject = BABYLON.SerializationHelper.Serialize(this);
|
|
var serializationObject = BABYLON.SerializationHelper.Serialize(this);
|
|
|
|
+ serializationObject.customType = "BABYLON.GlowLayer";
|
|
var index;
|
|
var index;
|
|
// Included meshes
|
|
// Included meshes
|
|
serializationObject.includedMeshes = [];
|
|
serializationObject.includedMeshes = [];
|
|
@@ -91148,7 +91410,7 @@ var BABYLON;
|
|
BABYLON.serialize()
|
|
BABYLON.serialize()
|
|
], GlowLayer.prototype, "intensity", null);
|
|
], GlowLayer.prototype, "intensity", null);
|
|
__decorate([
|
|
__decorate([
|
|
- BABYLON.serialize('options')
|
|
|
|
|
|
+ BABYLON.serialize("options")
|
|
], GlowLayer.prototype, "_options", void 0);
|
|
], GlowLayer.prototype, "_options", void 0);
|
|
return GlowLayer;
|
|
return GlowLayer;
|
|
}(BABYLON.EffectLayer));
|
|
}(BABYLON.EffectLayer));
|
|
@@ -92201,6 +92463,14 @@ var BABYLON;
|
|
serializationObject.sounds.push(soundtrack.soundCollection[soundId].serialize());
|
|
serializationObject.sounds.push(soundtrack.soundCollection[soundId].serialize());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ // Effect layers
|
|
|
|
+ serializationObject.effectLayers = [];
|
|
|
|
+ for (index = 0; index < scene.effectLayers.length; index++) {
|
|
|
|
+ var layer = scene.effectLayers[index];
|
|
|
|
+ if (layer.serialize) {
|
|
|
|
+ serializationObject.effectLayers.push(layer.serialize());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
return serializationObject;
|
|
return serializationObject;
|
|
};
|
|
};
|
|
SceneSerializer.SerializeMesh = function (toSerialize /* Mesh || Mesh[] */, withParents, withChildren) {
|
|
SceneSerializer.SerializeMesh = function (toSerialize /* Mesh || Mesh[] */, withParents, withChildren) {
|
|
@@ -99396,8 +99666,6 @@ module.exports = "SHARE";
|
|
/* 34 */
|
|
/* 34 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
-var __decorate=this&&this.__decorate||function(e,t,r,c){var o,f=arguments.length,n=f<3?t:null===c?c=Object.getOwnPropertyDescriptor(t,r):c;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,c);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(n=(f<3?o(n):f>3?o(t,r,n):o(t,r))||n);return f>3&&n&&Object.defineProperty(t,r,n),n};
|
|
|
|
-var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var n in o)o.hasOwnProperty(n)&&(t[n]=o[n])};return function(o,n){function r(){this.constructor=o}t(o,n),o.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();
|
|
|
|
|
|
|
|
|
|
|
|
(function universalModuleDefinition(root, factory) {
|
|
(function universalModuleDefinition(root, factory) {
|
|
@@ -99421,6 +99689,8 @@ var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__p
|
|
})(this, function(BABYLON) {
|
|
})(this, function(BABYLON) {
|
|
BABYLON = BABYLON || this.BABYLON;
|
|
BABYLON = BABYLON || this.BABYLON;
|
|
|
|
|
|
|
|
+var __decorate=this&&this.__decorate||function(e,t,r,c){var o,f=arguments.length,n=f<3?t:null===c?c=Object.getOwnPropertyDescriptor(t,r):c;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,c);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(n=(f<3?o(n):f>3?o(t,r,n):o(t,r))||n);return f>3&&n&&Object.defineProperty(t,r,n),n};
|
|
|
|
+var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var n in o)o.hasOwnProperty(n)&&(t[n]=o[n])};return function(o,n){function r(){this.constructor=o}t(o,n),o.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();
|
|
"use strict";
|
|
"use strict";
|
|
|
|
|
|
var BABYLON;
|
|
var BABYLON;
|
|
@@ -103219,7 +103489,7 @@ var BABYLON;
|
|
_this._babylonScene = scene;
|
|
_this._babylonScene = scene;
|
|
_this._rootUrl = rootUrl;
|
|
_this._rootUrl = rootUrl;
|
|
_this._progressCallback = onProgress;
|
|
_this._progressCallback = onProgress;
|
|
- _this._state = BABYLON.GLTFLoaderState.Loading;
|
|
|
|
|
|
+ _this._state = BABYLON.GLTFLoaderState.LOADING;
|
|
_this._loadData(data);
|
|
_this._loadData(data);
|
|
_this._checkExtensions();
|
|
_this._checkExtensions();
|
|
var promises = new Array();
|
|
var promises = new Array();
|
|
@@ -103237,7 +103507,7 @@ var BABYLON;
|
|
promises.push(_this._compileShadowGeneratorsAsync());
|
|
promises.push(_this._compileShadowGeneratorsAsync());
|
|
}
|
|
}
|
|
var resultPromise = Promise.all(promises).then(function () {
|
|
var resultPromise = Promise.all(promises).then(function () {
|
|
- _this._state = BABYLON.GLTFLoaderState.Ready;
|
|
|
|
|
|
+ _this._state = BABYLON.GLTFLoaderState.READY;
|
|
_this._startAnimations();
|
|
_this._startAnimations();
|
|
});
|
|
});
|
|
resultPromise.then(function () {
|
|
resultPromise.then(function () {
|
|
@@ -103245,7 +103515,7 @@ var BABYLON;
|
|
BABYLON.Tools.SetImmediate(function () {
|
|
BABYLON.Tools.SetImmediate(function () {
|
|
if (!_this._disposed) {
|
|
if (!_this._disposed) {
|
|
Promise.all(_this._completePromises).then(function () {
|
|
Promise.all(_this._completePromises).then(function () {
|
|
- _this._state = BABYLON.GLTFLoaderState.Complete;
|
|
|
|
|
|
+ _this._state = BABYLON.GLTFLoaderState.COMPLETE;
|
|
_this.onCompleteObservable.notifyObservers(_this);
|
|
_this.onCompleteObservable.notifyObservers(_this);
|
|
_this.onCompleteObservable.clear();
|
|
_this.onCompleteObservable.clear();
|
|
_this._clear();
|
|
_this._clear();
|
|
@@ -104283,7 +104553,7 @@ var BABYLON;
|
|
}, function (event) {
|
|
}, function (event) {
|
|
if (!_this._disposed) {
|
|
if (!_this._disposed) {
|
|
try {
|
|
try {
|
|
- if (request && _this._state === BABYLON.GLTFLoaderState.Loading) {
|
|
|
|
|
|
+ if (request && _this._state === BABYLON.GLTFLoaderState.LOADING) {
|
|
request._lengthComputable = event.lengthComputable;
|
|
request._lengthComputable = event.lengthComputable;
|
|
request._loaded = event.loaded;
|
|
request._loaded = event.loaded;
|
|
request._total = event.total;
|
|
request._total = event.total;
|