Kaynağa Gözat

Merge remote-tracking branch 'BabylonJS/master' into viewer-extends

Raanan Weber 7 yıl önce
ebeveyn
işleme
a10f6c3520
55 değiştirilmiş dosya ile 28530 ekleme ve 28442 silme
  1. 15008 15006
      Playground/babylon.d.txt
  2. 13011 13010
      dist/preview release/babylon.d.ts
  3. 11 11
      dist/preview release/babylon.js
  4. 53 46
      dist/preview release/babylon.max.js
  5. 53 46
      dist/preview release/babylon.no-module.max.js
  6. 11 11
      dist/preview release/babylon.worker.js
  7. 53 46
      dist/preview release/es6.js
  8. 1 1
      dist/preview release/gltf2Interface/package.json
  9. 1 1
      dist/preview release/gui/package.json
  10. 4 4
      dist/preview release/inspector/babylon.inspector.bundle.js
  11. 6 0
      dist/preview release/inspector/babylon.inspector.d.ts
  12. 6 0
      dist/preview release/inspector/babylon.inspector.js
  13. 4 4
      dist/preview release/inspector/babylon.inspector.min.js
  14. 1 1
      dist/preview release/inspector/package.json
  15. 1 1
      dist/preview release/loaders/babylon.glTF2FileLoader.d.ts
  16. 15 13
      dist/preview release/loaders/babylon.glTF2FileLoader.js
  17. 2 2
      dist/preview release/loaders/babylon.glTF2FileLoader.min.js
  18. 1 1
      dist/preview release/loaders/babylon.glTFFileLoader.d.ts
  19. 15 13
      dist/preview release/loaders/babylon.glTFFileLoader.js
  20. 2 2
      dist/preview release/loaders/babylon.glTFFileLoader.min.js
  21. 1 1
      dist/preview release/loaders/babylonjs.loaders.d.ts
  22. 15 13
      dist/preview release/loaders/babylonjs.loaders.js
  23. 4 4
      dist/preview release/loaders/babylonjs.loaders.min.js
  24. 1 1
      dist/preview release/loaders/babylonjs.loaders.module.d.ts
  25. 2 2
      dist/preview release/loaders/package.json
  26. 1 1
      dist/preview release/materialsLibrary/package.json
  27. 1 1
      dist/preview release/postProcessesLibrary/package.json
  28. 1 1
      dist/preview release/proceduralTexturesLibrary/package.json
  29. 2 2
      dist/preview release/serializers/package.json
  30. 18 18
      dist/preview release/viewer/babylon.viewer.js
  31. 68 59
      dist/preview release/viewer/babylon.viewer.max.js
  32. 1 1
      dist/preview release/viewer/package.json
  33. 58 59
      dist/preview release/what's new.md
  34. 6 0
      inspector/src/properties.ts
  35. 12 11
      loaders/src/glTF/2.0/babylon.glTFLoader.ts
  36. 1 1
      loaders/src/glTF/2.0/babylon.glTFLoaderInterfaces.ts
  37. 1 1
      materialsLibrary/src/cell/cell.fragment.fx
  38. 1 1
      package.json
  39. 1 1
      sandbox/index.css
  40. 18 7
      src/Animations/babylon.runtimeAnimation.ts
  41. 1 1
      src/Engine/babylon.engine.ts
  42. 1 1
      src/Lights/babylon.spotLight.ts
  43. 1 1
      src/Materials/Textures/babylon.dynamicTexture.ts
  44. 1 1
      src/Materials/babylon.material.ts
  45. 17 17
      src/Materials/babylon.standardMaterial.ts
  46. 1 1
      src/Mesh/babylon.abstractMesh.ts
  47. 1 1
      src/Mesh/babylon.meshBuilder.ts
  48. 22 3
      src/Morph/babylon.morphTarget.ts
  49. 4 4
      src/Particles/EmitterTypes/babylon.boxParticleEmitter.ts
  50. 3 3
      src/Particles/EmitterTypes/babylon.sphereParticleEmitter.ts
  51. 4 3
      src/Particles/babylon.solidParticleSystem.ts
  52. 2 2
      tests/unit/babylon/src/Loading/babylon.sceneLoader.tests.ts
  53. BIN
      tests/validation/ReferenceImages/assetContainer.png
  54. BIN
      tests/validation/ReferenceImages/pbrglossy.png
  55. BIN
      tests/validation/ReferenceImages/pbrrough.png

Dosya farkı çok büyük olduğundan ihmal edildi
+ 15008 - 15006
Playground/babylon.d.txt


Dosya farkı çok büyük olduğundan ihmal edildi
+ 13011 - 13010
dist/preview release/babylon.d.ts


Dosya farkı çok büyük olduğundan ihmal edildi
+ 11 - 11
dist/preview release/babylon.js


+ 53 - 46
dist/preview release/babylon.max.js

@@ -12017,7 +12017,7 @@ var BABYLON;
              * Returns the current version of the framework
              */
             get: function () {
-                return "3.2.0-rc.2";
+                return "3.2.0-rc.3";
             },
             enumerable: true,
             configurable: true
@@ -29688,7 +29688,7 @@ var BABYLON;
                 case VertexBuffer.BYTE: {
                     var value = dataView.getInt8(byteOffset);
                     if (normalized) {
-                        value = (value + 0.5) / 127.5;
+                        value = Math.max(value / 127, -1);
                     }
                     return value;
                 }
@@ -29702,7 +29702,7 @@ var BABYLON;
                 case VertexBuffer.SHORT: {
                     var value = dataView.getInt16(byteOffset, true);
                     if (normalized) {
-                        value = (value + 0.5) / 16383.5;
+                        value = Math.max(value / 16383, -1);
                     }
                     return value;
                 }
@@ -38824,17 +38824,16 @@ var BABYLON;
             if (!data) {
                 return null;
             }
-            var defaultStride = BABYLON.VertexBuffer.DeduceStride(vertexBuffer.getKind());
-            var defaultByteStride = defaultStride * BABYLON.VertexBuffer.GetTypeByteLength(vertexBuffer.type);
-            var count = this._totalVertices * defaultStride;
-            if (vertexBuffer.type !== BABYLON.VertexBuffer.FLOAT || vertexBuffer.byteStride !== defaultByteStride) {
+            var tightlyPackedByteStride = vertexBuffer.getSize() * BABYLON.VertexBuffer.GetTypeByteLength(vertexBuffer.type);
+            var count = this._totalVertices * vertexBuffer.getSize();
+            if (vertexBuffer.type !== BABYLON.VertexBuffer.FLOAT || vertexBuffer.byteStride !== tightlyPackedByteStride) {
                 var copy_1 = new Array(count);
                 vertexBuffer.forEach(count, function (value, index) {
                     copy_1[index] = value;
                 });
                 return copy_1;
             }
-            if (!(data instanceof Array || data instanceof Float32Array) || vertexBuffer.byteOffset !== 0 || data.length !== count) {
+            if (!((data instanceof Array) || (data instanceof Float32Array)) || vertexBuffer.byteOffset !== 0 || data.length !== count) {
                 if (data instanceof Array) {
                     var offset = vertexBuffer.byteOffset / 4;
                     return BABYLON.Tools.Slice(data, offset, offset + count);
@@ -51882,8 +51881,13 @@ var BABYLON;
         });
         /**
          * Resets the runtime animation to the beginning
+         * @param restoreOriginal defines whether to restore the target property to the original value
          */
-        RuntimeAnimation.prototype.reset = function () {
+        RuntimeAnimation.prototype.reset = function (restoreOriginal) {
+            if (restoreOriginal === void 0) { restoreOriginal = false; }
+            if (restoreOriginal && this._originalValue != null) {
+                this.setValue(this._originalValue, -1);
+            }
             this._offsetsCache = {};
             this._highLimitsCache = {};
             this._currentFrame = 0;
@@ -51923,9 +51927,9 @@ var BABYLON;
             return this._animation._interpolate(currentFrame, repeatCount, this._workValue, loopMode, offsetValue, highLimitValue);
         };
         /**
-         * Affect the interpolated value to the target
+         * Apply the interpolated value to the target
          * @param currentValue defines the value computed by the animation
-         * @param weight defines the weight to apply to this value
+         * @param weight defines the weight to apply to this value (Defaults to 1.0)
          */
         RuntimeAnimation.prototype.setValue = function (currentValue, weight) {
             if (weight === void 0) { weight = 1.0; }
@@ -51939,14 +51943,7 @@ var BABYLON;
                 this._setValue(this._target, currentValue, weight);
             }
         };
-        /**
-         * Sets the value of the runtime animation
-         * @param target The target property of the runtime animation
-         * @param currentValue The current value to use for the runtime animation
-         * @param weight The weight to use for the runtime animation (Defaults to 1.0)
-         */
         RuntimeAnimation.prototype._setValue = function (target, currentValue, weight) {
-            if (weight === void 0) { weight = 1.0; }
             // Set value
             var path;
             var destination;
@@ -51966,9 +51963,23 @@ var BABYLON;
             this._targetPath = path;
             this._activeTarget = destination;
             this._weight = weight;
+            if (!this._originalValue) {
+                var originalValue = void 0;
+                if (destination.getRestPose && path === "_matrix") { // For bones
+                    originalValue = destination.getRestPose();
+                }
+                else {
+                    originalValue = destination[path];
+                }
+                if (originalValue && originalValue.clone) {
+                    this._originalValue = originalValue.clone();
+                }
+                else {
+                    this._originalValue = originalValue;
+                }
+            }
             // Blending
             var enableBlending = target && target.animationPropertiesOverride ? target.animationPropertiesOverride.enableBlending : this._animation.enableBlending;
-            var blendingSpeed = target && target.animationPropertiesOverride ? target.animationPropertiesOverride.blendingSpeed : this._animation.blendingSpeed;
             if (enableBlending && this._blendingFactor <= 1.0) {
                 if (!this._originalBlendValue) {
                     var originalValue = destination[path];
@@ -51979,25 +51990,6 @@ var BABYLON;
                         this._originalBlendValue = originalValue;
                     }
                 }
-            }
-            if (weight !== -1.0) {
-                if (!this._originalValue) {
-                    var originalValue = void 0;
-                    if (destination.getRestPose && path === "_matrix") { // For bones
-                        originalValue = destination.getRestPose();
-                    }
-                    else {
-                        originalValue = destination[path];
-                    }
-                    if (originalValue.clone) {
-                        this._originalValue = originalValue.clone();
-                    }
-                    else {
-                        this._originalValue = originalValue;
-                    }
-                }
-            }
-            if (enableBlending && this._blendingFactor <= 1.0) {
                 if (this._originalBlendValue.m) { // Matrix
                     if (BABYLON.Animation.AllowMatrixDecomposeForInterpolation) {
                         if (this._currentValue) {
@@ -52031,6 +52023,7 @@ var BABYLON;
                         this._currentValue = currentValue;
                     }
                 }
+                var blendingSpeed = target && target.animationPropertiesOverride ? target.animationPropertiesOverride.blendingSpeed : this._animation.blendingSpeed;
                 this._blendingFactor += blendingSpeed;
             }
             else {
@@ -52376,12 +52369,7 @@ var BABYLON;
         Animatable.prototype.reset = function () {
             var runtimeAnimations = this._runtimeAnimations;
             for (var index = 0; index < runtimeAnimations.length; index++) {
-                runtimeAnimations[index].reset();
-            }
-            // Reset to original value
-            for (index = 0; index < runtimeAnimations.length; index++) {
-                var animation = runtimeAnimations[index];
-                animation.animate(0, this.fromFrame, this.toFrame, false, this._speedRatio);
+                runtimeAnimations[index].reset(true);
             }
             this._localDelayOffset = null;
             this._pausedDelay = null;
@@ -86123,8 +86111,9 @@ var BABYLON;
          */
         function MorphTarget(
         /** defines the name of the target */
-        name, influence) {
+        name, influence, scene) {
             if (influence === void 0) { influence = 0; }
+            if (scene === void 0) { scene = null; }
             this.name = name;
             /**
              * Gets or sets the list of animations
@@ -86137,6 +86126,8 @@ var BABYLON;
              * Observable raised when the influence changes
              */
             this.onInfluenceChanged = new BABYLON.Observable();
+            this._animationPropertiesOverride = null;
+            this._scene = scene || BABYLON.Engine.LastCreatedScene;
             this.influence = influence;
         }
         Object.defineProperty(MorphTarget.prototype, "influence", {
@@ -86159,6 +86150,22 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        Object.defineProperty(MorphTarget.prototype, "animationPropertiesOverride", {
+            /**
+             * Gets or sets the animation properties override
+             */
+            get: function () {
+                if (!this._animationPropertiesOverride && this._scene) {
+                    return this._scene.animationPropertiesOverride;
+                }
+                return this._animationPropertiesOverride;
+            },
+            set: function (value) {
+                this._animationPropertiesOverride = value;
+            },
+            enumerable: true,
+            configurable: true
+        });
         Object.defineProperty(MorphTarget.prototype, "hasPositions", {
             /**
              * Gets a boolean defining if the target contains position data
@@ -86285,7 +86292,7 @@ var BABYLON;
             if (!name) {
                 name = mesh.name;
             }
-            var result = new MorphTarget(name, influence);
+            var result = new MorphTarget(name, influence, mesh.getScene());
             result.setPositions(mesh.getVerticesData(BABYLON.VertexBuffer.PositionKind));
             if (mesh.isVerticesDataPresent(BABYLON.VertexBuffer.NormalKind)) {
                 result.setNormals(mesh.getVerticesData(BABYLON.VertexBuffer.NormalKind));

+ 53 - 46
dist/preview release/babylon.no-module.max.js

@@ -11984,7 +11984,7 @@ var BABYLON;
              * Returns the current version of the framework
              */
             get: function () {
-                return "3.2.0-rc.2";
+                return "3.2.0-rc.3";
             },
             enumerable: true,
             configurable: true
@@ -29655,7 +29655,7 @@ var BABYLON;
                 case VertexBuffer.BYTE: {
                     var value = dataView.getInt8(byteOffset);
                     if (normalized) {
-                        value = (value + 0.5) / 127.5;
+                        value = Math.max(value / 127, -1);
                     }
                     return value;
                 }
@@ -29669,7 +29669,7 @@ var BABYLON;
                 case VertexBuffer.SHORT: {
                     var value = dataView.getInt16(byteOffset, true);
                     if (normalized) {
-                        value = (value + 0.5) / 16383.5;
+                        value = Math.max(value / 16383, -1);
                     }
                     return value;
                 }
@@ -38791,17 +38791,16 @@ var BABYLON;
             if (!data) {
                 return null;
             }
-            var defaultStride = BABYLON.VertexBuffer.DeduceStride(vertexBuffer.getKind());
-            var defaultByteStride = defaultStride * BABYLON.VertexBuffer.GetTypeByteLength(vertexBuffer.type);
-            var count = this._totalVertices * defaultStride;
-            if (vertexBuffer.type !== BABYLON.VertexBuffer.FLOAT || vertexBuffer.byteStride !== defaultByteStride) {
+            var tightlyPackedByteStride = vertexBuffer.getSize() * BABYLON.VertexBuffer.GetTypeByteLength(vertexBuffer.type);
+            var count = this._totalVertices * vertexBuffer.getSize();
+            if (vertexBuffer.type !== BABYLON.VertexBuffer.FLOAT || vertexBuffer.byteStride !== tightlyPackedByteStride) {
                 var copy_1 = new Array(count);
                 vertexBuffer.forEach(count, function (value, index) {
                     copy_1[index] = value;
                 });
                 return copy_1;
             }
-            if (!(data instanceof Array || data instanceof Float32Array) || vertexBuffer.byteOffset !== 0 || data.length !== count) {
+            if (!((data instanceof Array) || (data instanceof Float32Array)) || vertexBuffer.byteOffset !== 0 || data.length !== count) {
                 if (data instanceof Array) {
                     var offset = vertexBuffer.byteOffset / 4;
                     return BABYLON.Tools.Slice(data, offset, offset + count);
@@ -51849,8 +51848,13 @@ var BABYLON;
         });
         /**
          * Resets the runtime animation to the beginning
+         * @param restoreOriginal defines whether to restore the target property to the original value
          */
-        RuntimeAnimation.prototype.reset = function () {
+        RuntimeAnimation.prototype.reset = function (restoreOriginal) {
+            if (restoreOriginal === void 0) { restoreOriginal = false; }
+            if (restoreOriginal && this._originalValue != null) {
+                this.setValue(this._originalValue, -1);
+            }
             this._offsetsCache = {};
             this._highLimitsCache = {};
             this._currentFrame = 0;
@@ -51890,9 +51894,9 @@ var BABYLON;
             return this._animation._interpolate(currentFrame, repeatCount, this._workValue, loopMode, offsetValue, highLimitValue);
         };
         /**
-         * Affect the interpolated value to the target
+         * Apply the interpolated value to the target
          * @param currentValue defines the value computed by the animation
-         * @param weight defines the weight to apply to this value
+         * @param weight defines the weight to apply to this value (Defaults to 1.0)
          */
         RuntimeAnimation.prototype.setValue = function (currentValue, weight) {
             if (weight === void 0) { weight = 1.0; }
@@ -51906,14 +51910,7 @@ var BABYLON;
                 this._setValue(this._target, currentValue, weight);
             }
         };
-        /**
-         * Sets the value of the runtime animation
-         * @param target The target property of the runtime animation
-         * @param currentValue The current value to use for the runtime animation
-         * @param weight The weight to use for the runtime animation (Defaults to 1.0)
-         */
         RuntimeAnimation.prototype._setValue = function (target, currentValue, weight) {
-            if (weight === void 0) { weight = 1.0; }
             // Set value
             var path;
             var destination;
@@ -51933,9 +51930,23 @@ var BABYLON;
             this._targetPath = path;
             this._activeTarget = destination;
             this._weight = weight;
+            if (!this._originalValue) {
+                var originalValue = void 0;
+                if (destination.getRestPose && path === "_matrix") { // For bones
+                    originalValue = destination.getRestPose();
+                }
+                else {
+                    originalValue = destination[path];
+                }
+                if (originalValue && originalValue.clone) {
+                    this._originalValue = originalValue.clone();
+                }
+                else {
+                    this._originalValue = originalValue;
+                }
+            }
             // Blending
             var enableBlending = target && target.animationPropertiesOverride ? target.animationPropertiesOverride.enableBlending : this._animation.enableBlending;
-            var blendingSpeed = target && target.animationPropertiesOverride ? target.animationPropertiesOverride.blendingSpeed : this._animation.blendingSpeed;
             if (enableBlending && this._blendingFactor <= 1.0) {
                 if (!this._originalBlendValue) {
                     var originalValue = destination[path];
@@ -51946,25 +51957,6 @@ var BABYLON;
                         this._originalBlendValue = originalValue;
                     }
                 }
-            }
-            if (weight !== -1.0) {
-                if (!this._originalValue) {
-                    var originalValue = void 0;
-                    if (destination.getRestPose && path === "_matrix") { // For bones
-                        originalValue = destination.getRestPose();
-                    }
-                    else {
-                        originalValue = destination[path];
-                    }
-                    if (originalValue.clone) {
-                        this._originalValue = originalValue.clone();
-                    }
-                    else {
-                        this._originalValue = originalValue;
-                    }
-                }
-            }
-            if (enableBlending && this._blendingFactor <= 1.0) {
                 if (this._originalBlendValue.m) { // Matrix
                     if (BABYLON.Animation.AllowMatrixDecomposeForInterpolation) {
                         if (this._currentValue) {
@@ -51998,6 +51990,7 @@ var BABYLON;
                         this._currentValue = currentValue;
                     }
                 }
+                var blendingSpeed = target && target.animationPropertiesOverride ? target.animationPropertiesOverride.blendingSpeed : this._animation.blendingSpeed;
                 this._blendingFactor += blendingSpeed;
             }
             else {
@@ -52343,12 +52336,7 @@ var BABYLON;
         Animatable.prototype.reset = function () {
             var runtimeAnimations = this._runtimeAnimations;
             for (var index = 0; index < runtimeAnimations.length; index++) {
-                runtimeAnimations[index].reset();
-            }
-            // Reset to original value
-            for (index = 0; index < runtimeAnimations.length; index++) {
-                var animation = runtimeAnimations[index];
-                animation.animate(0, this.fromFrame, this.toFrame, false, this._speedRatio);
+                runtimeAnimations[index].reset(true);
             }
             this._localDelayOffset = null;
             this._pausedDelay = null;
@@ -86090,8 +86078,9 @@ var BABYLON;
          */
         function MorphTarget(
         /** defines the name of the target */
-        name, influence) {
+        name, influence, scene) {
             if (influence === void 0) { influence = 0; }
+            if (scene === void 0) { scene = null; }
             this.name = name;
             /**
              * Gets or sets the list of animations
@@ -86104,6 +86093,8 @@ var BABYLON;
              * Observable raised when the influence changes
              */
             this.onInfluenceChanged = new BABYLON.Observable();
+            this._animationPropertiesOverride = null;
+            this._scene = scene || BABYLON.Engine.LastCreatedScene;
             this.influence = influence;
         }
         Object.defineProperty(MorphTarget.prototype, "influence", {
@@ -86126,6 +86117,22 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        Object.defineProperty(MorphTarget.prototype, "animationPropertiesOverride", {
+            /**
+             * Gets or sets the animation properties override
+             */
+            get: function () {
+                if (!this._animationPropertiesOverride && this._scene) {
+                    return this._scene.animationPropertiesOverride;
+                }
+                return this._animationPropertiesOverride;
+            },
+            set: function (value) {
+                this._animationPropertiesOverride = value;
+            },
+            enumerable: true,
+            configurable: true
+        });
         Object.defineProperty(MorphTarget.prototype, "hasPositions", {
             /**
              * Gets a boolean defining if the target contains position data
@@ -86252,7 +86259,7 @@ var BABYLON;
             if (!name) {
                 name = mesh.name;
             }
-            var result = new MorphTarget(name, influence);
+            var result = new MorphTarget(name, influence, mesh.getScene());
             result.setPositions(mesh.getVerticesData(BABYLON.VertexBuffer.PositionKind));
             if (mesh.isVerticesDataPresent(BABYLON.VertexBuffer.NormalKind)) {
                 result.setNormals(mesh.getVerticesData(BABYLON.VertexBuffer.NormalKind));

Dosya farkı çok büyük olduğundan ihmal edildi
+ 11 - 11
dist/preview release/babylon.worker.js


+ 53 - 46
dist/preview release/es6.js

@@ -11984,7 +11984,7 @@ var BABYLON;
              * Returns the current version of the framework
              */
             get: function () {
-                return "3.2.0-rc.2";
+                return "3.2.0-rc.3";
             },
             enumerable: true,
             configurable: true
@@ -29655,7 +29655,7 @@ var BABYLON;
                 case VertexBuffer.BYTE: {
                     var value = dataView.getInt8(byteOffset);
                     if (normalized) {
-                        value = (value + 0.5) / 127.5;
+                        value = Math.max(value / 127, -1);
                     }
                     return value;
                 }
@@ -29669,7 +29669,7 @@ var BABYLON;
                 case VertexBuffer.SHORT: {
                     var value = dataView.getInt16(byteOffset, true);
                     if (normalized) {
-                        value = (value + 0.5) / 16383.5;
+                        value = Math.max(value / 16383, -1);
                     }
                     return value;
                 }
@@ -38791,17 +38791,16 @@ var BABYLON;
             if (!data) {
                 return null;
             }
-            var defaultStride = BABYLON.VertexBuffer.DeduceStride(vertexBuffer.getKind());
-            var defaultByteStride = defaultStride * BABYLON.VertexBuffer.GetTypeByteLength(vertexBuffer.type);
-            var count = this._totalVertices * defaultStride;
-            if (vertexBuffer.type !== BABYLON.VertexBuffer.FLOAT || vertexBuffer.byteStride !== defaultByteStride) {
+            var tightlyPackedByteStride = vertexBuffer.getSize() * BABYLON.VertexBuffer.GetTypeByteLength(vertexBuffer.type);
+            var count = this._totalVertices * vertexBuffer.getSize();
+            if (vertexBuffer.type !== BABYLON.VertexBuffer.FLOAT || vertexBuffer.byteStride !== tightlyPackedByteStride) {
                 var copy_1 = new Array(count);
                 vertexBuffer.forEach(count, function (value, index) {
                     copy_1[index] = value;
                 });
                 return copy_1;
             }
-            if (!(data instanceof Array || data instanceof Float32Array) || vertexBuffer.byteOffset !== 0 || data.length !== count) {
+            if (!((data instanceof Array) || (data instanceof Float32Array)) || vertexBuffer.byteOffset !== 0 || data.length !== count) {
                 if (data instanceof Array) {
                     var offset = vertexBuffer.byteOffset / 4;
                     return BABYLON.Tools.Slice(data, offset, offset + count);
@@ -51849,8 +51848,13 @@ var BABYLON;
         });
         /**
          * Resets the runtime animation to the beginning
+         * @param restoreOriginal defines whether to restore the target property to the original value
          */
-        RuntimeAnimation.prototype.reset = function () {
+        RuntimeAnimation.prototype.reset = function (restoreOriginal) {
+            if (restoreOriginal === void 0) { restoreOriginal = false; }
+            if (restoreOriginal && this._originalValue != null) {
+                this.setValue(this._originalValue, -1);
+            }
             this._offsetsCache = {};
             this._highLimitsCache = {};
             this._currentFrame = 0;
@@ -51890,9 +51894,9 @@ var BABYLON;
             return this._animation._interpolate(currentFrame, repeatCount, this._workValue, loopMode, offsetValue, highLimitValue);
         };
         /**
-         * Affect the interpolated value to the target
+         * Apply the interpolated value to the target
          * @param currentValue defines the value computed by the animation
-         * @param weight defines the weight to apply to this value
+         * @param weight defines the weight to apply to this value (Defaults to 1.0)
          */
         RuntimeAnimation.prototype.setValue = function (currentValue, weight) {
             if (weight === void 0) { weight = 1.0; }
@@ -51906,14 +51910,7 @@ var BABYLON;
                 this._setValue(this._target, currentValue, weight);
             }
         };
-        /**
-         * Sets the value of the runtime animation
-         * @param target The target property of the runtime animation
-         * @param currentValue The current value to use for the runtime animation
-         * @param weight The weight to use for the runtime animation (Defaults to 1.0)
-         */
         RuntimeAnimation.prototype._setValue = function (target, currentValue, weight) {
-            if (weight === void 0) { weight = 1.0; }
             // Set value
             var path;
             var destination;
@@ -51933,9 +51930,23 @@ var BABYLON;
             this._targetPath = path;
             this._activeTarget = destination;
             this._weight = weight;
+            if (!this._originalValue) {
+                var originalValue = void 0;
+                if (destination.getRestPose && path === "_matrix") { // For bones
+                    originalValue = destination.getRestPose();
+                }
+                else {
+                    originalValue = destination[path];
+                }
+                if (originalValue && originalValue.clone) {
+                    this._originalValue = originalValue.clone();
+                }
+                else {
+                    this._originalValue = originalValue;
+                }
+            }
             // Blending
             var enableBlending = target && target.animationPropertiesOverride ? target.animationPropertiesOverride.enableBlending : this._animation.enableBlending;
-            var blendingSpeed = target && target.animationPropertiesOverride ? target.animationPropertiesOverride.blendingSpeed : this._animation.blendingSpeed;
             if (enableBlending && this._blendingFactor <= 1.0) {
                 if (!this._originalBlendValue) {
                     var originalValue = destination[path];
@@ -51946,25 +51957,6 @@ var BABYLON;
                         this._originalBlendValue = originalValue;
                     }
                 }
-            }
-            if (weight !== -1.0) {
-                if (!this._originalValue) {
-                    var originalValue = void 0;
-                    if (destination.getRestPose && path === "_matrix") { // For bones
-                        originalValue = destination.getRestPose();
-                    }
-                    else {
-                        originalValue = destination[path];
-                    }
-                    if (originalValue.clone) {
-                        this._originalValue = originalValue.clone();
-                    }
-                    else {
-                        this._originalValue = originalValue;
-                    }
-                }
-            }
-            if (enableBlending && this._blendingFactor <= 1.0) {
                 if (this._originalBlendValue.m) { // Matrix
                     if (BABYLON.Animation.AllowMatrixDecomposeForInterpolation) {
                         if (this._currentValue) {
@@ -51998,6 +51990,7 @@ var BABYLON;
                         this._currentValue = currentValue;
                     }
                 }
+                var blendingSpeed = target && target.animationPropertiesOverride ? target.animationPropertiesOverride.blendingSpeed : this._animation.blendingSpeed;
                 this._blendingFactor += blendingSpeed;
             }
             else {
@@ -52343,12 +52336,7 @@ var BABYLON;
         Animatable.prototype.reset = function () {
             var runtimeAnimations = this._runtimeAnimations;
             for (var index = 0; index < runtimeAnimations.length; index++) {
-                runtimeAnimations[index].reset();
-            }
-            // Reset to original value
-            for (index = 0; index < runtimeAnimations.length; index++) {
-                var animation = runtimeAnimations[index];
-                animation.animate(0, this.fromFrame, this.toFrame, false, this._speedRatio);
+                runtimeAnimations[index].reset(true);
             }
             this._localDelayOffset = null;
             this._pausedDelay = null;
@@ -86090,8 +86078,9 @@ var BABYLON;
          */
         function MorphTarget(
         /** defines the name of the target */
-        name, influence) {
+        name, influence, scene) {
             if (influence === void 0) { influence = 0; }
+            if (scene === void 0) { scene = null; }
             this.name = name;
             /**
              * Gets or sets the list of animations
@@ -86104,6 +86093,8 @@ var BABYLON;
              * Observable raised when the influence changes
              */
             this.onInfluenceChanged = new BABYLON.Observable();
+            this._animationPropertiesOverride = null;
+            this._scene = scene || BABYLON.Engine.LastCreatedScene;
             this.influence = influence;
         }
         Object.defineProperty(MorphTarget.prototype, "influence", {
@@ -86126,6 +86117,22 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        Object.defineProperty(MorphTarget.prototype, "animationPropertiesOverride", {
+            /**
+             * Gets or sets the animation properties override
+             */
+            get: function () {
+                if (!this._animationPropertiesOverride && this._scene) {
+                    return this._scene.animationPropertiesOverride;
+                }
+                return this._animationPropertiesOverride;
+            },
+            set: function (value) {
+                this._animationPropertiesOverride = value;
+            },
+            enumerable: true,
+            configurable: true
+        });
         Object.defineProperty(MorphTarget.prototype, "hasPositions", {
             /**
              * Gets a boolean defining if the target contains position data
@@ -86252,7 +86259,7 @@ var BABYLON;
             if (!name) {
                 name = mesh.name;
             }
-            var result = new MorphTarget(name, influence);
+            var result = new MorphTarget(name, influence, mesh.getScene());
             result.setPositions(mesh.getVerticesData(BABYLON.VertexBuffer.PositionKind));
             if (mesh.isVerticesDataPresent(BABYLON.VertexBuffer.NormalKind)) {
                 result.setNormals(mesh.getVerticesData(BABYLON.VertexBuffer.NormalKind));

+ 1 - 1
dist/preview release/gltf2Interface/package.json

@@ -1,7 +1,7 @@
 {
     "name": "babylonjs-gltf2interface",
     "description": "A typescript declaration of babylon's gltf2 inteface.",
-    "version": "3.2.0-rc.2",
+    "version": "3.2.0-rc.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 1 - 1
dist/preview release/gui/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-gui",
     "description": "The Babylon.js GUI library is an extension you can use to generate interactive user interface. It is build on top of the DynamicTexture.",
-    "version": "3.2.0-rc.2",
+    "version": "3.2.0-rc.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

Dosya farkı çok büyük olduğundan ihmal edildi
+ 4 - 4
dist/preview release/inspector/babylon.inspector.bundle.js


+ 6 - 0
dist/preview release/inspector/babylon.inspector.d.ts

@@ -226,6 +226,12 @@ declare module INSPECTOR {
         'PhysicsImpostor': {
             type: typeof BABYLON.PhysicsImpostor;
         };
+        'ImageProcessingConfiguration': {
+            type: typeof BABYLON.ImageProcessingConfiguration;
+        };
+        'ColorCurves': {
+            type: typeof BABYLON.ColorCurves;
+        };
     };
 }
 

+ 6 - 0
dist/preview release/inspector/babylon.inspector.js

@@ -477,6 +477,12 @@ var INSPECTOR;
         'PhysicsImpostor': {
             type: BABYLON.PhysicsImpostor
         },
+        'ImageProcessingConfiguration': {
+            type: BABYLON.ImageProcessingConfiguration
+        },
+        'ColorCurves': {
+            type: BABYLON.ColorCurves
+        }
     };
 })(INSPECTOR || (INSPECTOR = {}));
 

Dosya farkı çok büyük olduğundan ihmal edildi
+ 4 - 4
dist/preview release/inspector/babylon.inspector.min.js


+ 1 - 1
dist/preview release/inspector/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-inspector",
     "description": "The Babylon.js inspector.",
-    "version": "3.2.0-rc.2",
+    "version": "3.2.0-rc.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 1 - 1
dist/preview release/loaders/babylon.glTF2FileLoader.d.ts

@@ -443,7 +443,7 @@ declare module BABYLON.GLTF2 {
         _parent: _ILoaderNode;
         _babylonMesh?: Mesh;
         _primitiveBabylonMeshes?: Mesh[];
-        _babylonAnimationTargets?: Node[];
+        _babylonBones?: Bone[];
         _numMorphTargets?: number;
     }
     /** @hidden */

+ 15 - 13
dist/preview release/loaders/babylon.glTF2FileLoader.js

@@ -1055,8 +1055,6 @@ var BABYLON;
                 var promises = new Array();
                 var babylonMesh = new BABYLON.Mesh(node.name || "node" + node._index, this._babylonScene, node._parent._babylonMesh);
                 node._babylonMesh = babylonMesh;
-                node._babylonAnimationTargets = node._babylonAnimationTargets || [];
-                node._babylonAnimationTargets.push(babylonMesh);
                 GLTFLoader._LoadTransform(node, babylonMesh);
                 if (node.mesh != undefined) {
                     var mesh = GLTFLoader._GetProperty(context + "/mesh", this._gltf.meshes, node.mesh);
@@ -1320,8 +1318,8 @@ var BABYLON;
                 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);
                 babylonBones[node._index] = babylonBone;
-                node._babylonAnimationTargets = node._babylonAnimationTargets || [];
-                node._babylonAnimationTargets.push(babylonBone);
+                node._babylonBones = node._babylonBones || [];
+                node._babylonBones.push(babylonBone);
                 return babylonBone;
             };
             GLTFLoader.prototype._loadSkinInverseBindMatricesDataAsync = function (context, skin) {
@@ -1418,7 +1416,7 @@ var BABYLON;
                 var targetNode = GLTFLoader._GetProperty(context + "/target/node", this._gltf.nodes, channel.target.node);
                 // Ignore animations that have no animation targets.
                 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();
                 }
                 // Ignore animations targeting TRS of skinned nodes.
@@ -1534,13 +1532,12 @@ var BABYLON;
                                 value: key.value[targetIndex],
                                 outTangent: key.outTangent ? key.outTangent[targetIndex] : undefined
                             }); }));
-                            var morphTargets = new Array();
                             _this._forEachPrimitive(targetNode, function (babylonMesh) {
                                 var morphTarget = babylonMesh.morphTargetManager.getTarget(targetIndex);
-                                morphTarget.animations.push(babylonAnimation);
-                                morphTargets.push(morphTarget);
+                                var babylonAnimationClone = babylonAnimation.clone();
+                                morphTarget.animations.push(babylonAnimationClone);
+                                babylonAnimationGroup.addTargetedAnimation(babylonAnimationClone, morphTarget);
                             });
-                            babylonAnimationGroup.addTargetedAnimation(babylonAnimation, morphTargets);
                         };
                         for (var targetIndex = 0; targetIndex < targetNode._numMorphTargets; targetIndex++) {
                             _loop_1(targetIndex);
@@ -1550,12 +1547,17 @@ var BABYLON;
                         var animationName = babylonAnimationGroup.name + "_channel" + babylonAnimationGroup.targetedAnimations.length;
                         var babylonAnimation = new BABYLON.Animation(animationName, targetPath, 1, animationType);
                         babylonAnimation.setKeys(keys);
-                        if (targetNode._babylonAnimationTargets) {
-                            for (var _i = 0, _a = targetNode._babylonAnimationTargets; _i < _a.length; _i++) {
-                                var babylonAnimationTarget = _a[_i];
+                        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, targetNode._babylonAnimationTargets);
+                            babylonAnimationGroup.addTargetedAnimation(babylonAnimation, babylonAnimationTargets);
+                        }
+                        else {
+                            targetNode._babylonMesh.animations.push(babylonAnimation);
+                            babylonAnimationGroup.addTargetedAnimation(babylonAnimation, targetNode._babylonMesh);
                         }
                     }
                 });

Dosya farkı çok büyük olduğundan ihmal edildi
+ 2 - 2
dist/preview release/loaders/babylon.glTF2FileLoader.min.js


+ 1 - 1
dist/preview release/loaders/babylon.glTFFileLoader.d.ts

@@ -1019,7 +1019,7 @@ declare module BABYLON.GLTF2 {
         _parent: _ILoaderNode;
         _babylonMesh?: Mesh;
         _primitiveBabylonMeshes?: Mesh[];
-        _babylonAnimationTargets?: Node[];
+        _babylonBones?: Bone[];
         _numMorphTargets?: number;
     }
     /** @hidden */

+ 15 - 13
dist/preview release/loaders/babylon.glTFFileLoader.js

@@ -3270,8 +3270,6 @@ var BABYLON;
                 var promises = new Array();
                 var babylonMesh = new BABYLON.Mesh(node.name || "node" + node._index, this._babylonScene, node._parent._babylonMesh);
                 node._babylonMesh = babylonMesh;
-                node._babylonAnimationTargets = node._babylonAnimationTargets || [];
-                node._babylonAnimationTargets.push(babylonMesh);
                 GLTFLoader._LoadTransform(node, babylonMesh);
                 if (node.mesh != undefined) {
                     var mesh = GLTFLoader._GetProperty(context + "/mesh", this._gltf.meshes, node.mesh);
@@ -3535,8 +3533,8 @@ var BABYLON;
                 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);
                 babylonBones[node._index] = babylonBone;
-                node._babylonAnimationTargets = node._babylonAnimationTargets || [];
-                node._babylonAnimationTargets.push(babylonBone);
+                node._babylonBones = node._babylonBones || [];
+                node._babylonBones.push(babylonBone);
                 return babylonBone;
             };
             GLTFLoader.prototype._loadSkinInverseBindMatricesDataAsync = function (context, skin) {
@@ -3633,7 +3631,7 @@ var BABYLON;
                 var targetNode = GLTFLoader._GetProperty(context + "/target/node", this._gltf.nodes, channel.target.node);
                 // Ignore animations that have no animation targets.
                 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();
                 }
                 // Ignore animations targeting TRS of skinned nodes.
@@ -3749,13 +3747,12 @@ var BABYLON;
                                 value: key.value[targetIndex],
                                 outTangent: key.outTangent ? key.outTangent[targetIndex] : undefined
                             }); }));
-                            var morphTargets = new Array();
                             _this._forEachPrimitive(targetNode, function (babylonMesh) {
                                 var morphTarget = babylonMesh.morphTargetManager.getTarget(targetIndex);
-                                morphTarget.animations.push(babylonAnimation);
-                                morphTargets.push(morphTarget);
+                                var babylonAnimationClone = babylonAnimation.clone();
+                                morphTarget.animations.push(babylonAnimationClone);
+                                babylonAnimationGroup.addTargetedAnimation(babylonAnimationClone, morphTarget);
                             });
-                            babylonAnimationGroup.addTargetedAnimation(babylonAnimation, morphTargets);
                         };
                         for (var targetIndex = 0; targetIndex < targetNode._numMorphTargets; targetIndex++) {
                             _loop_1(targetIndex);
@@ -3765,12 +3762,17 @@ var BABYLON;
                         var animationName = babylonAnimationGroup.name + "_channel" + babylonAnimationGroup.targetedAnimations.length;
                         var babylonAnimation = new BABYLON.Animation(animationName, targetPath, 1, animationType);
                         babylonAnimation.setKeys(keys);
-                        if (targetNode._babylonAnimationTargets) {
-                            for (var _i = 0, _a = targetNode._babylonAnimationTargets; _i < _a.length; _i++) {
-                                var babylonAnimationTarget = _a[_i];
+                        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, targetNode._babylonAnimationTargets);
+                            babylonAnimationGroup.addTargetedAnimation(babylonAnimation, babylonAnimationTargets);
+                        }
+                        else {
+                            targetNode._babylonMesh.animations.push(babylonAnimation);
+                            babylonAnimationGroup.addTargetedAnimation(babylonAnimation, targetNode._babylonMesh);
                         }
                     }
                 });

Dosya farkı çok büyük olduğundan ihmal edildi
+ 2 - 2
dist/preview release/loaders/babylon.glTFFileLoader.min.js


+ 1 - 1
dist/preview release/loaders/babylonjs.loaders.d.ts

@@ -1115,7 +1115,7 @@ declare module BABYLON.GLTF2 {
         _parent: _ILoaderNode;
         _babylonMesh?: Mesh;
         _primitiveBabylonMeshes?: Mesh[];
-        _babylonAnimationTargets?: Node[];
+        _babylonBones?: Bone[];
         _numMorphTargets?: number;
     }
     /** @hidden */

+ 15 - 13
dist/preview release/loaders/babylonjs.loaders.js

@@ -4252,8 +4252,6 @@ var BABYLON;
                 var promises = new Array();
                 var babylonMesh = new BABYLON.Mesh(node.name || "node" + node._index, this._babylonScene, node._parent._babylonMesh);
                 node._babylonMesh = babylonMesh;
-                node._babylonAnimationTargets = node._babylonAnimationTargets || [];
-                node._babylonAnimationTargets.push(babylonMesh);
                 GLTFLoader._LoadTransform(node, babylonMesh);
                 if (node.mesh != undefined) {
                     var mesh = GLTFLoader._GetProperty(context + "/mesh", this._gltf.meshes, node.mesh);
@@ -4517,8 +4515,8 @@ var BABYLON;
                 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);
                 babylonBones[node._index] = babylonBone;
-                node._babylonAnimationTargets = node._babylonAnimationTargets || [];
-                node._babylonAnimationTargets.push(babylonBone);
+                node._babylonBones = node._babylonBones || [];
+                node._babylonBones.push(babylonBone);
                 return babylonBone;
             };
             GLTFLoader.prototype._loadSkinInverseBindMatricesDataAsync = function (context, skin) {
@@ -4615,7 +4613,7 @@ var BABYLON;
                 var targetNode = GLTFLoader._GetProperty(context + "/target/node", this._gltf.nodes, channel.target.node);
                 // Ignore animations that have no animation targets.
                 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();
                 }
                 // Ignore animations targeting TRS of skinned nodes.
@@ -4731,13 +4729,12 @@ var BABYLON;
                                 value: key.value[targetIndex],
                                 outTangent: key.outTangent ? key.outTangent[targetIndex] : undefined
                             }); }));
-                            var morphTargets = new Array();
                             _this._forEachPrimitive(targetNode, function (babylonMesh) {
                                 var morphTarget = babylonMesh.morphTargetManager.getTarget(targetIndex);
-                                morphTarget.animations.push(babylonAnimation);
-                                morphTargets.push(morphTarget);
+                                var babylonAnimationClone = babylonAnimation.clone();
+                                morphTarget.animations.push(babylonAnimationClone);
+                                babylonAnimationGroup.addTargetedAnimation(babylonAnimationClone, morphTarget);
                             });
-                            babylonAnimationGroup.addTargetedAnimation(babylonAnimation, morphTargets);
                         };
                         for (var targetIndex = 0; targetIndex < targetNode._numMorphTargets; targetIndex++) {
                             _loop_1(targetIndex);
@@ -4747,12 +4744,17 @@ var BABYLON;
                         var animationName = babylonAnimationGroup.name + "_channel" + babylonAnimationGroup.targetedAnimations.length;
                         var babylonAnimation = new BABYLON.Animation(animationName, targetPath, 1, animationType);
                         babylonAnimation.setKeys(keys);
-                        if (targetNode._babylonAnimationTargets) {
-                            for (var _i = 0, _a = targetNode._babylonAnimationTargets; _i < _a.length; _i++) {
-                                var babylonAnimationTarget = _a[_i];
+                        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, targetNode._babylonAnimationTargets);
+                            babylonAnimationGroup.addTargetedAnimation(babylonAnimation, babylonAnimationTargets);
+                        }
+                        else {
+                            targetNode._babylonMesh.animations.push(babylonAnimation);
+                            babylonAnimationGroup.addTargetedAnimation(babylonAnimation, targetNode._babylonMesh);
                         }
                     }
                 });

Dosya farkı çok büyük olduğundan ihmal edildi
+ 4 - 4
dist/preview release/loaders/babylonjs.loaders.min.js


+ 1 - 1
dist/preview release/loaders/babylonjs.loaders.module.d.ts

@@ -1122,7 +1122,7 @@ declare module BABYLON.GLTF2 {
         _parent: _ILoaderNode;
         _babylonMesh?: Mesh;
         _primitiveBabylonMeshes?: Mesh[];
-        _babylonAnimationTargets?: Node[];
+        _babylonBones?: Bone[];
         _numMorphTargets?: number;
     }
     /** @hidden */

+ 2 - 2
dist/preview release/loaders/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-loaders",
     "description": "The Babylon.js file loaders library is an extension you can use to load different 3D file types into a Babylon scene.",
-    "version": "3.2.0-rc.2",
+    "version": "3.2.0-rc.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,7 +27,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs-gltf2interface": "3.2.0-rc.2"
+        "babylonjs-gltf2interface": "3.2.0-rc.3"
     },
     "peerDependencies": {
         "babylonjs": ">=3.2.0-alpha"

+ 1 - 1
dist/preview release/materialsLibrary/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-materials",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "3.2.0-rc.2",
+    "version": "3.2.0-rc.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 1 - 1
dist/preview release/postProcessesLibrary/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-post-process",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "3.2.0-rc.2",
+    "version": "3.2.0-rc.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 1 - 1
dist/preview release/proceduralTexturesLibrary/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-procedural-textures",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "3.2.0-rc.2",
+    "version": "3.2.0-rc.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 2 - 2
dist/preview release/serializers/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-serializers",
     "description": "The Babylon.js serializers library is an extension you can use to serialize Babylon scenes.",
-    "version": "3.2.0-rc.2",
+    "version": "3.2.0-rc.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,7 +27,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs-gltf2interface": "3.2.0-rc.2"
+        "babylonjs-gltf2interface": "3.2.0-rc.3"
     },
     "peerDependencies": {
         "babylonjs": ">=3.2.0-alpha"

Dosya farkı çok büyük olduğundan ihmal edildi
+ 18 - 18
dist/preview release/viewer/babylon.viewer.js


+ 68 - 59
dist/preview release/viewer/babylon.viewer.max.js

@@ -12105,7 +12105,7 @@ var BABYLON;
              * Returns the current version of the framework
              */
             get: function () {
-                return "3.2.0-rc.2";
+                return "3.2.0-rc.3";
             },
             enumerable: true,
             configurable: true
@@ -29776,7 +29776,7 @@ var BABYLON;
                 case VertexBuffer.BYTE: {
                     var value = dataView.getInt8(byteOffset);
                     if (normalized) {
-                        value = (value + 0.5) / 127.5;
+                        value = Math.max(value / 127, -1);
                     }
                     return value;
                 }
@@ -29790,7 +29790,7 @@ var BABYLON;
                 case VertexBuffer.SHORT: {
                     var value = dataView.getInt16(byteOffset, true);
                     if (normalized) {
-                        value = (value + 0.5) / 16383.5;
+                        value = Math.max(value / 16383, -1);
                     }
                     return value;
                 }
@@ -38912,17 +38912,16 @@ var BABYLON;
             if (!data) {
                 return null;
             }
-            var defaultStride = BABYLON.VertexBuffer.DeduceStride(vertexBuffer.getKind());
-            var defaultByteStride = defaultStride * BABYLON.VertexBuffer.GetTypeByteLength(vertexBuffer.type);
-            var count = this._totalVertices * defaultStride;
-            if (vertexBuffer.type !== BABYLON.VertexBuffer.FLOAT || vertexBuffer.byteStride !== defaultByteStride) {
+            var tightlyPackedByteStride = vertexBuffer.getSize() * BABYLON.VertexBuffer.GetTypeByteLength(vertexBuffer.type);
+            var count = this._totalVertices * vertexBuffer.getSize();
+            if (vertexBuffer.type !== BABYLON.VertexBuffer.FLOAT || vertexBuffer.byteStride !== tightlyPackedByteStride) {
                 var copy_1 = new Array(count);
                 vertexBuffer.forEach(count, function (value, index) {
                     copy_1[index] = value;
                 });
                 return copy_1;
             }
-            if (!(data instanceof Array || data instanceof Float32Array) || vertexBuffer.byteOffset !== 0 || data.length !== count) {
+            if (!((data instanceof Array) || (data instanceof Float32Array)) || vertexBuffer.byteOffset !== 0 || data.length !== count) {
                 if (data instanceof Array) {
                     var offset = vertexBuffer.byteOffset / 4;
                     return BABYLON.Tools.Slice(data, offset, offset + count);
@@ -51970,8 +51969,13 @@ var BABYLON;
         });
         /**
          * Resets the runtime animation to the beginning
+         * @param restoreOriginal defines whether to restore the target property to the original value
          */
-        RuntimeAnimation.prototype.reset = function () {
+        RuntimeAnimation.prototype.reset = function (restoreOriginal) {
+            if (restoreOriginal === void 0) { restoreOriginal = false; }
+            if (restoreOriginal && this._originalValue != null) {
+                this.setValue(this._originalValue, -1);
+            }
             this._offsetsCache = {};
             this._highLimitsCache = {};
             this._currentFrame = 0;
@@ -52011,9 +52015,9 @@ var BABYLON;
             return this._animation._interpolate(currentFrame, repeatCount, this._workValue, loopMode, offsetValue, highLimitValue);
         };
         /**
-         * Affect the interpolated value to the target
+         * Apply the interpolated value to the target
          * @param currentValue defines the value computed by the animation
-         * @param weight defines the weight to apply to this value
+         * @param weight defines the weight to apply to this value (Defaults to 1.0)
          */
         RuntimeAnimation.prototype.setValue = function (currentValue, weight) {
             if (weight === void 0) { weight = 1.0; }
@@ -52027,14 +52031,7 @@ var BABYLON;
                 this._setValue(this._target, currentValue, weight);
             }
         };
-        /**
-         * Sets the value of the runtime animation
-         * @param target The target property of the runtime animation
-         * @param currentValue The current value to use for the runtime animation
-         * @param weight The weight to use for the runtime animation (Defaults to 1.0)
-         */
         RuntimeAnimation.prototype._setValue = function (target, currentValue, weight) {
-            if (weight === void 0) { weight = 1.0; }
             // Set value
             var path;
             var destination;
@@ -52054,9 +52051,23 @@ var BABYLON;
             this._targetPath = path;
             this._activeTarget = destination;
             this._weight = weight;
+            if (!this._originalValue) {
+                var originalValue = void 0;
+                if (destination.getRestPose && path === "_matrix") { // For bones
+                    originalValue = destination.getRestPose();
+                }
+                else {
+                    originalValue = destination[path];
+                }
+                if (originalValue && originalValue.clone) {
+                    this._originalValue = originalValue.clone();
+                }
+                else {
+                    this._originalValue = originalValue;
+                }
+            }
             // Blending
             var enableBlending = target && target.animationPropertiesOverride ? target.animationPropertiesOverride.enableBlending : this._animation.enableBlending;
-            var blendingSpeed = target && target.animationPropertiesOverride ? target.animationPropertiesOverride.blendingSpeed : this._animation.blendingSpeed;
             if (enableBlending && this._blendingFactor <= 1.0) {
                 if (!this._originalBlendValue) {
                     var originalValue = destination[path];
@@ -52067,25 +52078,6 @@ var BABYLON;
                         this._originalBlendValue = originalValue;
                     }
                 }
-            }
-            if (weight !== -1.0) {
-                if (!this._originalValue) {
-                    var originalValue = void 0;
-                    if (destination.getRestPose && path === "_matrix") { // For bones
-                        originalValue = destination.getRestPose();
-                    }
-                    else {
-                        originalValue = destination[path];
-                    }
-                    if (originalValue.clone) {
-                        this._originalValue = originalValue.clone();
-                    }
-                    else {
-                        this._originalValue = originalValue;
-                    }
-                }
-            }
-            if (enableBlending && this._blendingFactor <= 1.0) {
                 if (this._originalBlendValue.m) { // Matrix
                     if (BABYLON.Animation.AllowMatrixDecomposeForInterpolation) {
                         if (this._currentValue) {
@@ -52119,6 +52111,7 @@ var BABYLON;
                         this._currentValue = currentValue;
                     }
                 }
+                var blendingSpeed = target && target.animationPropertiesOverride ? target.animationPropertiesOverride.blendingSpeed : this._animation.blendingSpeed;
                 this._blendingFactor += blendingSpeed;
             }
             else {
@@ -52464,12 +52457,7 @@ var BABYLON;
         Animatable.prototype.reset = function () {
             var runtimeAnimations = this._runtimeAnimations;
             for (var index = 0; index < runtimeAnimations.length; index++) {
-                runtimeAnimations[index].reset();
-            }
-            // Reset to original value
-            for (index = 0; index < runtimeAnimations.length; index++) {
-                var animation = runtimeAnimations[index];
-                animation.animate(0, this.fromFrame, this.toFrame, false, this._speedRatio);
+                runtimeAnimations[index].reset(true);
             }
             this._localDelayOffset = null;
             this._pausedDelay = null;
@@ -86211,8 +86199,9 @@ var BABYLON;
          */
         function MorphTarget(
         /** defines the name of the target */
-        name, influence) {
+        name, influence, scene) {
             if (influence === void 0) { influence = 0; }
+            if (scene === void 0) { scene = null; }
             this.name = name;
             /**
              * Gets or sets the list of animations
@@ -86225,6 +86214,8 @@ var BABYLON;
              * Observable raised when the influence changes
              */
             this.onInfluenceChanged = new BABYLON.Observable();
+            this._animationPropertiesOverride = null;
+            this._scene = scene || BABYLON.Engine.LastCreatedScene;
             this.influence = influence;
         }
         Object.defineProperty(MorphTarget.prototype, "influence", {
@@ -86247,6 +86238,22 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        Object.defineProperty(MorphTarget.prototype, "animationPropertiesOverride", {
+            /**
+             * Gets or sets the animation properties override
+             */
+            get: function () {
+                if (!this._animationPropertiesOverride && this._scene) {
+                    return this._scene.animationPropertiesOverride;
+                }
+                return this._animationPropertiesOverride;
+            },
+            set: function (value) {
+                this._animationPropertiesOverride = value;
+            },
+            enumerable: true,
+            configurable: true
+        });
         Object.defineProperty(MorphTarget.prototype, "hasPositions", {
             /**
              * Gets a boolean defining if the target contains position data
@@ -86373,7 +86380,7 @@ var BABYLON;
             if (!name) {
                 name = mesh.name;
             }
-            var result = new MorphTarget(name, influence);
+            var result = new MorphTarget(name, influence, mesh.getScene());
             result.setPositions(mesh.getVerticesData(BABYLON.VertexBuffer.PositionKind));
             if (mesh.isVerticesDataPresent(BABYLON.VertexBuffer.NormalKind)) {
                 result.setNormals(mesh.getVerticesData(BABYLON.VertexBuffer.NormalKind));
@@ -104698,8 +104705,6 @@ var BABYLON;
                 var promises = new Array();
                 var babylonMesh = new BABYLON.Mesh(node.name || "node" + node._index, this._babylonScene, node._parent._babylonMesh);
                 node._babylonMesh = babylonMesh;
-                node._babylonAnimationTargets = node._babylonAnimationTargets || [];
-                node._babylonAnimationTargets.push(babylonMesh);
                 GLTFLoader._LoadTransform(node, babylonMesh);
                 if (node.mesh != undefined) {
                     var mesh = GLTFLoader._GetProperty(context + "/mesh", this._gltf.meshes, node.mesh);
@@ -104963,8 +104968,8 @@ var BABYLON;
                 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);
                 babylonBones[node._index] = babylonBone;
-                node._babylonAnimationTargets = node._babylonAnimationTargets || [];
-                node._babylonAnimationTargets.push(babylonBone);
+                node._babylonBones = node._babylonBones || [];
+                node._babylonBones.push(babylonBone);
                 return babylonBone;
             };
             GLTFLoader.prototype._loadSkinInverseBindMatricesDataAsync = function (context, skin) {
@@ -105061,7 +105066,7 @@ var BABYLON;
                 var targetNode = GLTFLoader._GetProperty(context + "/target/node", this._gltf.nodes, channel.target.node);
                 // Ignore animations that have no animation targets.
                 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();
                 }
                 // Ignore animations targeting TRS of skinned nodes.
@@ -105177,13 +105182,12 @@ var BABYLON;
                                 value: key.value[targetIndex],
                                 outTangent: key.outTangent ? key.outTangent[targetIndex] : undefined
                             }); }));
-                            var morphTargets = new Array();
                             _this._forEachPrimitive(targetNode, function (babylonMesh) {
                                 var morphTarget = babylonMesh.morphTargetManager.getTarget(targetIndex);
-                                morphTarget.animations.push(babylonAnimation);
-                                morphTargets.push(morphTarget);
+                                var babylonAnimationClone = babylonAnimation.clone();
+                                morphTarget.animations.push(babylonAnimationClone);
+                                babylonAnimationGroup.addTargetedAnimation(babylonAnimationClone, morphTarget);
                             });
-                            babylonAnimationGroup.addTargetedAnimation(babylonAnimation, morphTargets);
                         };
                         for (var targetIndex = 0; targetIndex < targetNode._numMorphTargets; targetIndex++) {
                             _loop_1(targetIndex);
@@ -105193,12 +105197,17 @@ var BABYLON;
                         var animationName = babylonAnimationGroup.name + "_channel" + babylonAnimationGroup.targetedAnimations.length;
                         var babylonAnimation = new BABYLON.Animation(animationName, targetPath, 1, animationType);
                         babylonAnimation.setKeys(keys);
-                        if (targetNode._babylonAnimationTargets) {
-                            for (var _i = 0, _a = targetNode._babylonAnimationTargets; _i < _a.length; _i++) {
-                                var babylonAnimationTarget = _a[_i];
+                        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, targetNode._babylonAnimationTargets);
+                            babylonAnimationGroup.addTargetedAnimation(babylonAnimation, babylonAnimationTargets);
+                        }
+                        else {
+                            targetNode._babylonMesh.animations.push(babylonAnimation);
+                            babylonAnimationGroup.addTargetedAnimation(babylonAnimation, targetNode._babylonMesh);
                         }
                     }
                 });

+ 1 - 1
dist/preview release/viewer/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-viewer",
     "description": "A simple-to-use viewer based on BabylonJS to display 3D elements natively",
-    "version": "3.2.0-rc.2",
+    "version": "3.2.0-rc.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 58 - 59
dist/preview release/what's new.md

@@ -15,13 +15,13 @@
 - New [AssetContainer](http://doc.babylonjs.com/how_to/how_to_use_assetcontainer) class and loading methods ([trevordev](https://github.com/trevordev))
 - Added [depth of field](https://www.babylonjs-playground.com/frame.html#8F5HYV#9), [MSAA, sharpening, chromatic aberration and grain effect](https://www.babylonjs-playground.com/#Y3C0HQ#146) to the default pipeline ([trevordev](https://github.com/trevordev))
 - Added support for [animation weights](http://doc.babylonjs.com/babylon101/animations#animation-weights). Demo [here](https://www.babylonjs-playground.com/#LL5BIQ) ([deltakosh](https://github.com/deltakosh))
-- Added [sub emitters for particle system](http://doc.babylonjs.com/babylon101/particles#sub-emitters) which will spawn new particle systems when particles dies. Demo [here](https://www.babylonjs-playground.com/frame.html#9NHBCC#1) ([IbraheemOsama](https://github.com/IbraheemOsama))
+- Added [sub emitters for particle system](http://doc.babylonjs.com/babylon101/particles#sub-emitters) which will spawn new particle systems when particles die. Demo [here](https://www.babylonjs-playground.com/frame.html#9NHBCC#1) ([IbraheemOsama](https://github.com/IbraheemOsama))
 - New [Babylon.js](http://doc.babylonjs.com/resources/maya) and [glTF](http://doc.babylonjs.com/resources/maya_to_gltf) exporter for Autodesk Maya ([Noalak](https://github.com/Noalak))
-- New glTF [serializer](https://github.com/BabylonJS/Babylon.js/tree/master/serializers/src/glTF/2.0). You can now export glTF or glb files directly from a Babylon scene ([kcoley](https://github.com/kcoley))
 - New [glTF exporter](http://doc.babylonjs.com/resources/3dsmax_to_gltf) for Autodesk 3dsmax ([Noalak](https://github.com/Noalak))
+- New glTF [serializer](http://doc.babylonjs.com/extensions/gltfexporter). You can now export glTF or glb files directly from a Babylon scene ([kcoley](https://github.com/kcoley))
 - Physics - Latest production version of Oimo.js is being used - 1.0.9 ([RaananW](https://github.com/RaananW))
 - Introduces [PCF](https://doc.babylonjs.com/babylon101/shadows#percentage-closer-filtering-webgl2-only) and [PCSS](https://doc.babylonjs.com/babylon101/shadows#contact-hardening-shadow-webgl2-only) shadow support in Webgl 2 ([sebavan](https://github.com/sebavan)))
-- Introduces [PBR Specular Anti Aliasing support](https://doc.babylonjs.com/how_to/physically_based_rendering_master#specular-aliasing) ([sebavan](https://github.com/sebavan)))
+- Introduces [PBR Specular Anti Aliasing support](https://doc.babylonjs.com/how_to/physically_based_rendering_master#specular-aliasing). Demoo [here](https://www.babylonjs-playground.com/#1XJD4C) ([sebavan](https://github.com/sebavan)))
 
 ## Documentation
 
@@ -31,7 +31,7 @@
 ## Updates
 
 - Improved [animation blending](https://www.babylonjs-playground.com/#DMLMIP#1) ([deltakosh](https://github.com/deltakosh))
-- New [particle system emitter shapes](http://doc.babylonjs.com/babylon101/particles#particles-shapes): cone and sphere ([IbraheemOsama](https://github.com/IbraheemOsama))
+- New [particle system emitter shapes](http://doc.babylonjs.com/babylon101/particles#shape-emitters): cone and sphere ([IbraheemOsama](https://github.com/IbraheemOsama))
 - Added support for 16bits TGA ([deltakosh](https://github.com/deltakosh))
 - New `AnimationPropertiesOverride` class used to simplify setting animation properties on child animations. [Documentation](http://doc.babylonjs.com/babylon101/animations#overriding-properties) ([deltakosh](https://github.com/deltakosh))
 - New `Texture.UseSerializedUrlIfAny` static property to let textures serialize complete URL instead of using side by side loading ([deltakosh](https://github.com/deltakosh))
@@ -39,107 +39,106 @@
 - Added support for all RGBA orders (BGR, RGB, etc..) for the DDS loader ([deltakosh](https://github.com/deltakosh))
 - Improved [SceneOptimizer](http://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer) to provide better adaptability ([deltakosh](https://github.com/deltakosh))
 - Improved `scene.isReady()` function which now takes in account shadows and LOD ([deltakosh](https://github.com/deltakosh))
-- New watcher configuration for VSCode. Now the task only compiles changed files ([sebavan](https://github.com/sebavan))
 - Added new draw modes to engine (points, lines, linesloop, linestrip, trianglestrip, trianglefan) ([benaadams](https://github.com/benaadams))
-- Added GUI Textblock.lineSpacing setter and getter to configure vertical space between lines in pixels or percentage values when working with text wrapping ([carloslanderas](https://github.com/carloslanderas))
-- VRHelper now has onSelectedMeshUnselected observable that will notify observers when the current selected mesh gets unselected
+- Added GUI `Textblock.lineSpacing` setter and getter to configure vertical space between lines in pixels or percentage values when working with text wrapping ([carloslanderas](https://github.com/carloslanderas))
+- WebVR:
+  - `VRExperienceHelper` will create an empty controller model so that controller interactions can be used while the actual model is still loading ([trevordev](https://github.com/trevordev))
+  - VRHelper now has `onSelectedMeshUnselected` observable that will notify observers when the current selected mesh gets unselected
   ([carloslanderas](https://github.com/carloslanderas))
-- VRHelper now has onBeforeCameraTeleport and onAfterCameraTeleport observables that will be notified before and after camera teleportation is triggered.
+  - VRHelper now has `onBeforeCameraTeleport` and `onAfterCameraTelepor`t observables that will be notified before and after camera teleportation is triggered.
   ([carloslanderas](https://github.com/carloslanderas))
-- VRHelper now has the public property teleportationEnabled to enable / disable camera teleportation.
+  - VRHelper now has the public property `teleportationEnabled` to enable / disable camera teleportation.
    ([carloslanderas](https://github.com/carloslanderas))
-- VRHelper now exposes onNewMeshPicked observable that will notify a PickingInfo object after meshSelectionPredicate evaluation
+  - VRHelper now exposes onNewMeshPicked observable that will notify a PickingInfo object after meshSelectionPredicate evaluation
    ([carloslanderas](https://github.com/carloslanderas))
-- `AssetsManager` will now clear its `tasks` lsit from all successfully loaded tasks ([deltakosh](https://github.com/deltakosh))
-- Added documentation to WebVRCamera and VRExperienceHelper ([trevordev](https://github.com/trevordev))
+  - VRHelper will notify now `onSelectedMeshUnselected` observable to subscribers when the applied ray selection predicate does not produce a hit and a mesh compliant with the meshSelectionPredicate was previously selected  ([carloslanderas](https://github.com/carloslanderas))
+  - Support multiple simultaneous WebVR controller gui interactions in `VRExperienceHelper` ([trevordev](https://github.com/trevordev))
+  - Ability to set a mesh to customize the WebVR gaze tracker ([trevordev](https://github.com/trevordev))
+- `AssetsManager` will now clear its `tasks` list from all successfully loaded tasks ([deltakosh](https://github.com/deltakosh))
+- Added documentation to `WebVRCamera` and `VRExperienceHelper` ([trevordev](https://github.com/trevordev))
 - Introduced `isStroke` on `HighlightLayerOptions` which makes the highlight solid ([PixelsCommander](https://github.com/pixelscommander))
-- (Viewer) There is now an option to paste payload instead of a URL for configuration ([RaananW](https://github.com/RaananW))
-- (Viewer) Models can be loaded async using JavaScript ([RaananW](https://github.com/RaananW))
-- VRHelper will notify now onSelectedMeshUnselected observable to subscribers when the applied ray selection predicate does not produce a hit and a mesh compliant with the meshSelectionPredicate was previously selected
-   ([carloslanderas](https://github.com/carloslanderas))
-- (Viewer) initScene and initEngine can now be extended. onProgress during model loading is implemented as observable. ([RaananW](https://github.com/RaananW))
-- glTF loader now supports the KHR_lights extension ([MiiBond](https://github.com/MiiBond))
-- The observable can now notify observers using promise-based callback chain. ([RaananW](https://github.com/RaananW))
+- The observables can now notify observers using promise-based callback chain ([RaananW](https://github.com/RaananW))
 - Added base64 helper functions to `Tools` ([bghgary](https://github.com/bghgary))
 - Added `createDefaultCamera` and `createDefaultLight` functions to `Scene` ([bghgary](https://github.com/bghgary))
-- Gulp process now supports multiple outputs when using webpack. ([RaananW](https://github.com/RaananW))
-- (Viewer) Scene Optimizer intergrated in viewer. ([RaananW](https://github.com/RaananW))
-- (Viewer) The viewer supports custom shaders in the configuration. ([RaananW](https://github.com/RaananW))
-- Documented PostProcessRenderEffect, DefaultRenderingPipeline, BlurPostProcess, DepthOfFieldEffect, PostProcess, PostProcessManager, Effect classes ([trevordev](https://github.com/trevordev))
+- Viewer:
+  - `initScene` and `initEngine` can now be extended. `onProgress` during model loading is implemented as observable ([RaananW](https://github.com/RaananW))
+  - There is now an option to paste payload instead of a URL for configuration ([RaananW](https://github.com/RaananW))
+  - Models can be loaded asynchronously using JavaScript ([RaananW](https://github.com/RaananW))
+  - Scene Optimizer integrated in viewer ([RaananW](https://github.com/RaananW))
+  - The viewer supports custom shaders in the configuration ([RaananW](https://github.com/RaananW))
+  - Introducing the viewer labs - testing new features ([RaananW](https://github.com/RaananW))
+  - Model can be normalized using configuration, camera is dynamically configured ([RaananW](https://github.com/RaananW))
+  - It is now possible to update parts of the configuration without recreating the objects ([RaananW](https://github.com/RaananW))
+  - Viewer supports model animations and multi-model loading ([RaananW](https://github.com/RaananW))
+  - Viewer's declaration file automatically generated ([RaananW](https://github.com/RaananW))
+- Build process:
+  - New watcher configuration for VSCode. Now the task only compiles changed files ([sebavan](https://github.com/sebavan))
+  - Gulp process now supports multiple outputs when using webpack. ([RaananW](https://github.com/RaananW))
+  - Extra/external declarations can be prepended to final declarations during build. ([RaananW](https://github.com/RaananW))
+  - Extra/external declarations can be prepended to final NPM declarations during build. ([RaananW](https://github.com/RaananW))
+  - NPM package now has a dependency system, updated during build. ([RaananW](https://github.com/RaananW))
 - SPS internal storage of each solid particle rotation matrix ([jbousquie](https://github.com/jbousquie))
 - SPS particle parenting feature ([jbousquie](https://github.com/jbousquie))
-- (Viewer) Introducing the viewer labs - testing new features. ([RaananW](https://github.com/RaananW))
 - KeepAssets class and AssetContainer.moveAllFromScene ([HoloLite](http://www.html5gamedevs.com/profile/28694-hololite/) [trevordev](https://github.com/trevordev))
-- (Viewer) It is now possible to update parts of the configuration without rcreating the objects. Extra configuration can be loaded sync (if provided) ([RaananW](https://github.com/RaananW))
-- (Gulp) extra/external declarations can be prepended to final declarations during build. ([RaananW](https://github.com/RaananW))
-- (Viewer) Model can be normalized using configuration, camera is dynamically configured. ([RaananW](https://github.com/RaananW))
-- (Gulp) extra/external declarations can be prepended to final NPM declarations during build. ([RaananW](https://github.com/RaananW))
 - GUI.Line can have its world position set from one end or the other ([SvenFrankson](https://github.com/SvenFrankson))
 - Added FOV system to background material for zoom effects in skyboxes without adjusting camera FOV ([DavidHGillen](https://github.com/DavidHGillen))
-- Improved glTF loader by using promises for asynchronous operations. ([bghgary](https://github.com/bghgary)]
-- Improved glTF loader performance by compiling materials in parallel with downloading external resources. ([bghgary](https://github.com/bghgary)]
-- Added unit tests for the glTF 2.0 loader. ([bghgary](https://github.com/bghgary)]
+- glTF loader:
+  - glTF loader now supports the KHR_lights extension ([MiiBond](https://github.com/MiiBond))
+  - Improved glTF loader by using promises for asynchronous operations ([bghgary](https://github.com/bghgary)]
+  - Improved glTF loader performance by compiling materials in parallel with downloading external resources ([bghgary](https://github.com/bghgary)]
+  - Added unit tests for the glTF 2.0 loader ([bghgary](https://github.com/bghgary)]
+  - Added support for primitive modes to glTF 2.0 loader ([bghgary](https://github.com/bghgary)]
+  - Add support for sparse accessors to glTF 2.0 loader ([bghgary](https://github.com/bghgary))
+  - Add support for cameras to glTF 2.0 loader ([bghgary](https://github.com/bghgary)]
+  - Add support for preprocessing urls to glTF 2.0 loader ([bghgary](https://github.com/bghgary)]
+  - Added Draco mesh compression support to glTF 2.0 loader. ([bghgary](https://github.com/bghgary))
+  - Added unlit material extension support to glTF 2.0 loader. ([bghgary](https://github.com/bghgary))
 - Added promise-based async functions to the SceneLoader, Scene.whenReadyAsync, and material.forceCompilationAsync. ([bghgary](https://github.com/bghgary)]
 - Added checks to VertexData.merge to ensure data is valid before merging. ([bghgary](https://github.com/bghgary)]
-- Ability to set a mesh to customize the webVR gaze tracker ([trevordev](https://github.com/trevordev))
-- Added promise-based async functions for initWebVRAsync and useStandingMatrixAsync ([trevordev](https://github.com/trevordev))
+- Added promise-based async functions for `initWebVRAsync` and `useStandingMatrixAsync` ([trevordev](https://github.com/trevordev))
 - Add stroke (outline) options on GUI text control ([SvenFrankson](https://github.com/SvenFrankson))
 - Add isThumbClamped option on GUI slider control ([JeanPhilippeKernel](https://github.com/JeanPhilippeKernel))
 - Add floating point texture support for RenderTargetCubeTexture ([PeapBoy](https://github.com/NicolasBuecher))
 - Support for mutli-touch when interacting with multiple gui elements simultaneously ([trevordev](https://github.com/trevordev))
-- (Viewer) Declaration file published, ready for npm. ([RaananW](https://github.com/RaananW))
-- Added Draco mesh compression support to glTF 2.0 loader. ([bghgary](https://github.com/bghgary))
-- Support multiple simultaneous webVR controller gui interactions in WebVRExperienceHelper ([trevordev](https://github.com/trevordev))
-- (Viewer) XHR requests not use Tools.LoadFile and are disposed correctly - [#3671](https://github.com/BabylonJS/Babylon.js/issues/3671) ([RaananW](https://github.com/RaananW))
+(https://github.com/trevordev))
 - Added `Tools.WorkerPool` class for web worker management. ([bghgary](https://github.com/bghgary))
 - Support depth maps for multiple active cameras for post processes like depth of field ([trevordev](https://github.com/trevordev))
 - Integrates depth texture support in the engine ([sebavan](https://github.com/sebavan))
-- NPM package now has a dependency system, updated during build. ([RaananW](https://github.com/RaananW))
-- WebVRExperienceHelper will create an empty controller model so that controller interactions can be used while the actual model is still loading ([trevordev](https://github.com/trevordev))
 - Default fragment shader will clamp negative values to avoid underflow, webVR post processing will render to eye texture size ([trevordev](https://github.com/trevordev))
 - Supports Environment Drag and Drop in Sandbox ([sebavan](https://github.com/sebavan))
 - EnvironmentHelper has no an onError observable to handle errors when loading the textures ([RaananW](https://github.com/RaananW))
-- (Viewer) Viewer supports model animations and multi-model loading ([RaananW](https://github.com/RaananW))
 - Tests for sharpen, chromatic aberration, default pipeline and enable/disable post processes ([trevordev](https://github.com/trevordev))
 - onPointer* callbacks have now the event type as a 3rd variable ([RaananW](https://github.com/RaananW))
 - Lightmap texture in PBR material follow the gammaSpace Flag of the texture ([sebavan](https://github.com/sebavan))
 - Added setTextureFromPostProcessOutput to bind the output of a postprocess into an effect ([trevordev](https://github.com/trevordev))
-- Added support for primitive modes to glTF 2.0 loader. ([bghgary](https://github.com/bghgary)]
 - Updated bloom effect to only bloom areas of the image above a luminance threshold ([trevordev](https://github.com/trevordev))
 - Cannon and Oimo are optional dependencies ([RaananW](https://github.com/RaananW))
 - Shadows - Introduces [Normal Bias](https://doc.babylonjs.com/babylon101/shadows#normal-bias-since-32) ([sebavan](https://github.com/sebavan)))
 - Earcut is an external, optional dependency. ([RaananW](https://github.com/RaananW))
 - Return animation groups when calling `SceneLoader.ImportMesh`. ([bghgary](https://github.com/bghgary)]
 - Add support for normalized and non-float data to `Buffer` and `VertexBuffer`. ([bghgary](https://github.com/bghgary)]
-- Added unlit material extension support to glTF 2.0 loader. ([bghgary](https://github.com/bghgary))
-- (Viewer) Viewer's declaration file automatically generated ([RaananW](https://github.com/RaananW))
 - New serialize and parse functions for effect layers (Highlight and Glow layers) ([julien-moreau](https://github.com/julien-moreau))
 - GUI: Introduced `MultiLine` which will draw lines between any number of meshes, controls and points. [Documentation](http://doc.babylonjs.com/how_to/gui#multiline) ([royibernthal](https://github.com/royibernthal))
-- Added alphaCutOff support for StandardMaterial ([deltakosh](https://github.com/deltakosh))
-- Add support for sparse accessors to glTF 2.0 loader. ([bghgary](https://github.com/bghgary))
-- Add support for cameras to glTF 2.0 loader. ([bghgary](https://github.com/bghgary)]
-- Add support for preprocessing urls to glTF 2.0 loader. ([bghgary](https://github.com/bghgary)]
-- Viewer upgrade - see [PR](https://github.com/BabylonJS/Babylon.js/pull/4160) ([RaananW](https://github.com/RaananW))
-- New serialize and parse functions for SSAO2 Rendering Pipeline ([julien-moreau](https://github.com/julien-moreau))
+- Added `alphaCutOff` support for StandardMaterial ([deltakosh](https://github.com/deltakosh))
+- New `serialize` and `Parse` functions for SSAO2 Rendering Pipeline ([julien-moreau](https://github.com/julien-moreau))
 
 ## Bug fixes
 
-- `setPivotMatrix` ws not setting pivot correctly. This is now fixed. We also introduced a new `setPreTransformMatrix` to reproduce the sometimes needed behavior of the previous `setPivotMatrix` function ([deltakosh](https://github.com/deltakosh))
+- `setPivotMatrix` was not setting pivot correctly. This is now fixed. We also introduced a new `setPreTransformMatrix` to reproduce the sometimes needed behavior of the previous `setPivotMatrix` function ([deltakosh](https://github.com/deltakosh))
 - SPS solid particle `.pivot` property now also behaves like the standard mesh pivot. Former behavior (particle translation) can be kept with the particle property `.translateFromPivot` set to true ([jbousquie](https://github.com/jbousquie))
 - Texture extension detection in `Engine.CreateTexture` ([sebavan](https://github.com/sebavan))
-- SPS internal temporary vector3 instead of Tmp.Vector3 to avoid possible concurrent uses ([jbousquie](https://github.com/jbousquie))
+- SPS uses internal temporary Vector3 instead of Tmp.Vector3 to avoid possible concurrent uses ([jbousquie](https://github.com/jbousquie))
 - Fixed a bug when calling load on an empty assets manager - [#3739](https://github.com/BabylonJS/Babylon.js/issues/3739) ([RaananW](https://github.com/RaananW))
 - Enabling teleportation in the vr helper class caused a redundant post process to be added ([trevordev](https://github.com/trevordev))
 - (Viewer) Fixed a bug where loading another mesh positioned it incorrectly ([RaananW](https://github.com/RaananW))
-- Scale vr controllers by deviceScale when it is set in VRExperienceHelper ([trevordev](https://github.com/trevordev))
 - (Viewer) Disabling templates now work correctly ([RaananW](https://github.com/RaananW))
+- Scale vr controllers by deviceScale when it is set in VRExperienceHelper ([trevordev](https://github.com/trevordev))
 - AMD "define" declaration is no longer anonymous ([RaananW](https://github.com/RaananW))
 - Collision worker didn't initialize instanced meshes correctly - [#3819](https://github.com/BabylonJS/Babylon.js/issues/3819) ([RaananW](https://github.com/RaananW))
-- postMessage calls in webworkers were fixed. ([RaananW](https://github.com/RaananW))
+- `postMessage` calls in webworkers were fixed ([RaananW](https://github.com/RaananW))
 - Fixed WebCam Texture on Firefox and Edge - [#3825](https://github.com/BabylonJS/Babylon.js/issues/3825) ([sebavan](https://github.com/sebavan))
-- Add onLoadObservable on VideoTexture - [#3845](https://github.com/BabylonJS/Babylon.js/issues/3845) ([sebavan](https://github.com/sebavan))
-- beforeRender is now triggered after the camera updated its state - [#3873](https://github.com/BabylonJS/Babylon.js/issues/3873) ([RaananW](https://github.com/RaananW))
-- Tools.DeepCopy no longer copying getter-only elements - [#3929](https://github.com/BabylonJS/Babylon.js/issues/3929) ([RaananW](https://github.com/RaananW))
+- Add `onLoadObservable` on VideoTexture - [#3845](https://github.com/BabylonJS/Babylon.js/issues/3845) ([sebavan](https://github.com/sebavan))
+- `beforeRender` is now triggered after the camera updated its state - [#3873](https://github.com/BabylonJS/Babylon.js/issues/3873) ([RaananW](https://github.com/RaananW))
 - Reflection and refraction no longer apply a toLinear conversion twice when applying image processing as a post process - [#4060](https://github.com/BabylonJS/Babylon.js/issues/4060) ([trevordev](https://github.com/trevordev))
 - Fix ember.js compatibility in ```PostProcessRenderEffect``` ([sebavan](https://github.com/sebavan))
 - Fix ember.js compatibility in ```BloomEffect``` and ```Camera``` ([kaysabelle](https://github.com/kaysabelle))
@@ -147,10 +146,10 @@
 
 ## Breaking changes
 
-- Removed the unused PostProcessRenderPass class and extended postProcessingRenderingEffect to support multiple PostProcesses ([trevordev](https://github.com/trevordev))
-- VertexData.merge no longer supports merging of data that do not have the same set of attributes. ([bghgary](https://github.com/bghgary)]
+- Removed the unused `PostProcessRenderPass` class and extended `postProcessingRenderingEffect` to support multiple PostProcesses ([trevordev](https://github.com/trevordev))
+- `VertexData.merge` no longer supports merging of data that do not have the same set of attributes. ([bghgary](https://github.com/bghgary)]
 - glTF 2.0 loader now creates a mesh for each primitive instead of merging the primitives together into one mesh. If a mesh only has one primitive, the behavior is the same as before. This change only affects meshes that have multiple primitives. ([bghgary](https://github.com/bghgary)]
-- Engine's onCanvasPointerOutObservable will now return a PointerEvent instead of the Engine. ([trevordev](https://github.com/trevordev))
+- Engine's `onCanvasPointerOutObservable` will now return a PointerEvent instead of the Engine. ([trevordev](https://github.com/trevordev))
 - Removed public references to default rendering pipeline's internal post process ([trevordev](https://github.com/trevordev))
 - `Bone.setScale` does not support scaleChildren property anymore. You can use `Bone.scale` to achieve the same effect ([deltakosh](https://github.com/deltakosh))
 - Vector3 &amp; Vector4:

+ 6 - 0
inspector/src/properties.ts

@@ -121,6 +121,12 @@ module INSPECTOR {
         'PhysicsImpostor': {
             type: BABYLON.PhysicsImpostor
         },
+        'ImageProcessingConfiguration': {
+            type: BABYLON.ImageProcessingConfiguration
+        },
+        'ColorCurves': {
+            type: BABYLON.ColorCurves
+        }
     }
 
 }

+ 12 - 11
loaders/src/glTF/2.0/babylon.glTFLoader.ts

@@ -507,9 +507,6 @@ module BABYLON.GLTF2 {
             const babylonMesh = new Mesh(node.name || `node${node._index}`, this._babylonScene, node._parent._babylonMesh);
             node._babylonMesh = babylonMesh;
 
-            node._babylonAnimationTargets = node._babylonAnimationTargets || [];
-            node._babylonAnimationTargets.push(babylonMesh);
-
             GLTFLoader._LoadTransform(node, babylonMesh);
 
             if (node.mesh != undefined) {
@@ -818,8 +815,8 @@ module BABYLON.GLTF2 {
             babylonBone = new Bone(node.name || `joint${node._index}`, skin._babylonSkeleton!, babylonParentBone, this._getNodeMatrix(node), null, null, boneIndex);
             babylonBones[node._index] = babylonBone;
 
-            node._babylonAnimationTargets = node._babylonAnimationTargets || [];
-            node._babylonAnimationTargets.push(babylonBone);
+            node._babylonBones = node._babylonBones || [];
+            node._babylonBones.push(babylonBone);
 
             return babylonBone;
         }
@@ -939,7 +936,7 @@ module BABYLON.GLTF2 {
 
             // Ignore animations that have no animation targets.
             if ((channel.target.path === AnimationChannelTargetPath.WEIGHTS && !targetNode._numMorphTargets) ||
-                (channel.target.path !== AnimationChannelTargetPath.WEIGHTS && !targetNode._babylonAnimationTargets)) {
+                (channel.target.path !== AnimationChannelTargetPath.WEIGHTS && !targetNode._babylonMesh)) {
                 return Promise.resolve();
             }
 
@@ -1075,12 +1072,16 @@ module BABYLON.GLTF2 {
                     const babylonAnimation = new Animation(animationName, targetPath, 1, animationType);
                     babylonAnimation.setKeys(keys);
 
-                    if (targetNode._babylonAnimationTargets) {
-                        for (const babylonAnimationTarget of targetNode._babylonAnimationTargets) {
-                            const babylonAnimationClone = babylonAnimation.clone();
-                            babylonAnimationTarget.animations.push(babylonAnimationClone);
-                            babylonAnimationGroup.addTargetedAnimation(babylonAnimationClone, babylonAnimationTarget);
+                    if (targetNode._babylonBones) {
+                        const babylonAnimationTargets = [targetNode._babylonMesh!, ...targetNode._babylonBones];
+                        for (const babylonAnimationTarget of babylonAnimationTargets) {
+                            babylonAnimationTarget.animations.push(babylonAnimation);
                         }
+                        babylonAnimationGroup.addTargetedAnimation(babylonAnimation, babylonAnimationTargets);
+                    }
+                    else {
+                        targetNode._babylonMesh!.animations.push(babylonAnimation);
+                        babylonAnimationGroup.addTargetedAnimation(babylonAnimation, targetNode._babylonMesh);
                     }
                 }
             });

+ 1 - 1
loaders/src/glTF/2.0/babylon.glTFLoaderInterfaces.ts

@@ -77,7 +77,7 @@ module BABYLON.GLTF2 {
         _parent: _ILoaderNode;
         _babylonMesh?: Mesh;
         _primitiveBabylonMeshes?: Mesh[];
-        _babylonAnimationTargets?: Node[];
+        _babylonBones?: Bone[];
         _numMorphTargets?: number;
     }
 

+ 1 - 1
materialsLibrary/src/cell/cell.fragment.fx

@@ -138,7 +138,7 @@ void main(void)
 	alpha *= vColor.a;
 #endif
 
-	vec3 finalDiffuse = clamp(diffuseBase * diffuseColor, 0.0, 1.0) * baseColor.rgb;;
+	vec3 finalDiffuse = clamp(diffuseBase * diffuseColor, 0.0, 1.0) * baseColor.rgb;
 
 	// Composition
 	vec4 color = vec4(finalDiffuse, alpha);

+ 1 - 1
package.json

@@ -9,7 +9,7 @@
     ],
     "name": "babylonjs",
     "description": "Babylon.js is a JavaScript 3D engine based on webgl.",
-    "version": "3.2.0-rc.2",
+    "version": "3.2.0-rc.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 1 - 1
sandbox/index.css

@@ -107,7 +107,7 @@ a {
 }
 
 #droptext {
-    position: absolute;;
+    position: absolute;
     text-align: center;
     color: #fff;
     height: 50px;

+ 18 - 7
src/Animations/babylon.runtimeAnimation.ts

@@ -222,6 +222,17 @@
          * @param weight defines the weight to apply to this value (Defaults to 1.0)
          */
         public setValue(currentValue: any, weight = 1.0): void {
+            if (this._target instanceof Array) {
+                for (const target of this._target) {
+                    this._setValue(target, currentValue, weight);
+                }
+            }
+            else {
+                this._setValue(this._target, currentValue, weight);
+            }
+        }
+
+        private _setValue(target: any, currentValue: any, weight: number): void {
             // Set value
             var path: any;
             var destination: any;
@@ -229,7 +240,7 @@
             let targetPropertyPath = this._animation.targetPropertyPath
 
             if (targetPropertyPath.length > 1) {
-                var property = this._target[targetPropertyPath[0]];
+                var property = target[targetPropertyPath[0]];
 
                 for (var index = 1; index < targetPropertyPath.length - 1; index++) {
                     property = property[targetPropertyPath[index]];
@@ -239,7 +250,7 @@
                 destination = property;
             } else {
                 path = targetPropertyPath[0];
-                destination = this._target;
+                destination = target;
             }
 
             this._targetPath = path;
@@ -255,7 +266,7 @@
                     originalValue = destination[path];
                 }
 
-                if (originalValue.clone) {
+                if (originalValue && originalValue.clone) {
                     this._originalValue = originalValue.clone();
                 } else {
                     this._originalValue = originalValue;
@@ -263,7 +274,7 @@
             }
 
             // Blending
-            const enableBlending = this._target && this._target.animationPropertiesOverride ? this._target.animationPropertiesOverride.enableBlending : this._animation.enableBlending;
+            const enableBlending = target && target.animationPropertiesOverride ? target.animationPropertiesOverride.enableBlending : this._animation.enableBlending;
             if (enableBlending && this._blendingFactor <= 1.0) {
                 if (!this._originalBlendValue) {
                     let originalValue = destination[path];
@@ -302,7 +313,7 @@
                     }
                 }
 
-                const blendingSpeed = this._target && this._target.animationPropertiesOverride ? this._target.animationPropertiesOverride.blendingSpeed : this._animation.blendingSpeed;
+                const blendingSpeed = target && target.animationPropertiesOverride ? target.animationPropertiesOverride.blendingSpeed : this._animation.blendingSpeed;
                 this._blendingFactor += blendingSpeed;
             } else {
                 this._currentValue = currentValue;
@@ -314,8 +325,8 @@
                 destination[path] = this._currentValue;
             }
 
-            if (this._target.markAsDirty) {
-                this._target.markAsDirty(this._animation.targetProperty);
+            if (target.markAsDirty) {
+                target.markAsDirty(this._animation.targetProperty);
             }
         }
 

+ 1 - 1
src/Engine/babylon.engine.ts

@@ -726,7 +726,7 @@
          * Returns the current version of the framework
          */
         public static get Version(): string {
-            return "3.2.0-rc.2";
+            return "3.2.0-rc.3";
         }
 
         // Updatable statics so stick with vars here

+ 1 - 1
src/Lights/babylon.spotLight.ts

@@ -67,7 +67,7 @@
             return this._projectionTextureMatrix;
         }
 
-        protected _projectionTextureLightNear : number = 1e-6;;
+        protected _projectionTextureLightNear : number = 1e-6;
         /**
          * Gets the near clip of the Spotlight for texture projection.
          */

+ 1 - 1
src/Materials/Textures/babylon.dynamicTexture.ts

@@ -140,7 +140,7 @@
                 x = (size.width - textSize.width) / 2;
             }
             if (y === null || y === undefined) {
-                var fontSize = parseInt((font.replace(/\D/g, '')));;
+                var fontSize = parseInt((font.replace(/\D/g, '')));
                 y = (size.height / 2) + (fontSize / 3.65);
             }
 

+ 1 - 1
src/Materials/babylon.material.ts

@@ -1368,7 +1368,7 @@
             }
 
             var materialType = Tools.Instantiate(parsedMaterial.customType);
-            return materialType.Parse(parsedMaterial, scene, rootUrl);;
+            return materialType.Parse(parsedMaterial, scene, rootUrl);
         }
     }
 } 

+ 17 - 17
src/Materials/babylon.standardMaterial.ts

@@ -120,49 +120,49 @@ module BABYLON {
 
     export class StandardMaterial extends PushMaterial {
         @serializeAsTexture("diffuseTexture")
-        private _diffuseTexture: Nullable<BaseTexture>;;
+        private _diffuseTexture: Nullable<BaseTexture>;
         @expandToProperty("_markAllSubMeshesAsTexturesAndMiscDirty")
-        public diffuseTexture: Nullable<BaseTexture>;;
+        public diffuseTexture: Nullable<BaseTexture>;
 
         @serializeAsTexture("ambientTexture")
-        private _ambientTexture: Nullable<BaseTexture>;;
+        private _ambientTexture: Nullable<BaseTexture>;
         @expandToProperty("_markAllSubMeshesAsTexturesDirty")
-        public ambientTexture: Nullable<BaseTexture>;;
+        public ambientTexture: Nullable<BaseTexture>;
 
         @serializeAsTexture("opacityTexture")
-        private _opacityTexture: Nullable<BaseTexture>;;
+        private _opacityTexture: Nullable<BaseTexture>;
         @expandToProperty("_markAllSubMeshesAsTexturesAndMiscDirty")
-        public opacityTexture: Nullable<BaseTexture>;;
+        public opacityTexture: Nullable<BaseTexture>;
 
         @serializeAsTexture("reflectionTexture")
-        private _reflectionTexture: Nullable<BaseTexture>;;
+        private _reflectionTexture: Nullable<BaseTexture>;
         @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public reflectionTexture: Nullable<BaseTexture>;
 
         @serializeAsTexture("emissiveTexture")
-        private _emissiveTexture: Nullable<BaseTexture>;;
+        private _emissiveTexture: Nullable<BaseTexture>;
         @expandToProperty("_markAllSubMeshesAsTexturesDirty")
-        public emissiveTexture: Nullable<BaseTexture>;;
+        public emissiveTexture: Nullable<BaseTexture>;
 
         @serializeAsTexture("specularTexture")
-        private _specularTexture: Nullable<BaseTexture>;;
+        private _specularTexture: Nullable<BaseTexture>;
         @expandToProperty("_markAllSubMeshesAsTexturesDirty")
-        public specularTexture: Nullable<BaseTexture>;;
+        public specularTexture: Nullable<BaseTexture>;
 
         @serializeAsTexture("bumpTexture")
-        private _bumpTexture: Nullable<BaseTexture>;;
+        private _bumpTexture: Nullable<BaseTexture>;
         @expandToProperty("_markAllSubMeshesAsTexturesDirty")
-        public bumpTexture: Nullable<BaseTexture>;;
+        public bumpTexture: Nullable<BaseTexture>;
 
         @serializeAsTexture("lightmapTexture")
-        private _lightmapTexture: Nullable<BaseTexture>;;
+        private _lightmapTexture: Nullable<BaseTexture>;
         @expandToProperty("_markAllSubMeshesAsTexturesDirty")
-        public lightmapTexture: Nullable<BaseTexture>;;
+        public lightmapTexture: Nullable<BaseTexture>;
 
         @serializeAsTexture("refractionTexture")
-        private _refractionTexture: Nullable<BaseTexture>;;
+        private _refractionTexture: Nullable<BaseTexture>;
         @expandToProperty("_markAllSubMeshesAsTexturesDirty")
-        public refractionTexture: Nullable<BaseTexture>;;
+        public refractionTexture: Nullable<BaseTexture>;
 
         @serializeAsColor3("ambient")
         public ambientColor = new Color3(0, 0, 0);

+ 1 - 1
src/Mesh/babylon.abstractMesh.ts

@@ -1151,7 +1151,7 @@
          * @returns true if the mesh is completely in the frustum planes 
          */
         public isCompletelyInFrustum(frustumPlanes: Plane[]): boolean {
-            return this._boundingInfo !== null && this._boundingInfo.isCompletelyInFrustum(frustumPlanes);;
+            return this._boundingInfo !== null && this._boundingInfo.isCompletelyInFrustum(frustumPlanes);
         }
 
         /** 

+ 1 - 1
src/Mesh/babylon.meshBuilder.ts

@@ -649,7 +649,7 @@
             var p = 0;
             var step = pi2 / tessellation * arc;
             var rotated;
-            var path = new Array<Vector3>();;
+            var path = new Array<Vector3>();
             for (i = 0; i <= tessellation; i++) {
                 var path: Vector3[] = [];
                 if (cap == Mesh.CAP_START || cap == Mesh.CAP_ALL) {

+ 22 - 3
src/Morph/babylon.morphTarget.ts

@@ -9,6 +9,7 @@ module BABYLON {
          */
         public animations = new Array<Animation>();
 
+        private _scene: Nullable<Scene>;
         private _positions: Nullable<FloatArray> = null;
         private _normals: Nullable<FloatArray> = null;
         private _tangents: Nullable<FloatArray> = null;
@@ -39,6 +40,23 @@ module BABYLON {
             }
         }
 
+        
+        private _animationPropertiesOverride: Nullable<AnimationPropertiesOverride> = null;
+
+        /**
+         * Gets or sets the animation properties override
+         */
+        public get animationPropertiesOverride(): Nullable<AnimationPropertiesOverride> {
+            if (!this._animationPropertiesOverride && this._scene) {
+                return this._scene.animationPropertiesOverride;
+            }
+            return this._animationPropertiesOverride;
+        }
+
+        public set animationPropertiesOverride(value: Nullable<AnimationPropertiesOverride>) {
+            this._animationPropertiesOverride = value;
+        }        
+
         /**
          * Creates a new MorphTarget
          * @param name defines the name of the target
@@ -46,8 +64,9 @@ module BABYLON {
          */
         public constructor(
             /** defines the name of the target */
-            public name: string, influence = 0) {
-            this.influence = influence;
+            public name: string, influence = 0, scene: Nullable<Scene> = null) {
+                this._scene = scene || Engine.LastCreatedScene;
+                this.influence = influence;
         }
 
         /**
@@ -186,7 +205,7 @@ module BABYLON {
                 name = mesh.name;
             }
 
-            var result = new MorphTarget(name, influence);
+            var result = new MorphTarget(name, influence, mesh.getScene());
 
             result.setPositions(<FloatArray>mesh.getVerticesData(VertexBuffer.PositionKind));
 

+ 4 - 4
src/Particles/EmitterTypes/babylon.boxParticleEmitter.ts

@@ -107,10 +107,10 @@ module BABYLON {
             var serializationObject: any = {};
 
             serializationObject.type = this.getClassName();
-            serializationObject.direction1  = this.direction1.asArray();;
-            serializationObject.direction2  = this.direction2.asArray();;
-            serializationObject.minEmitBox  = this.minEmitBox.asArray();;
-            serializationObject.maxEmitBox  = this.maxEmitBox.asArray();;
+            serializationObject.direction1  = this.direction1.asArray();
+            serializationObject.direction2  = this.direction2.asArray();
+            serializationObject.minEmitBox  = this.minEmitBox.asArray();
+            serializationObject.maxEmitBox  = this.maxEmitBox.asArray();
 
             return serializationObject;
         }

+ 3 - 3
src/Particles/EmitterTypes/babylon.sphereParticleEmitter.ts

@@ -199,10 +199,10 @@ module BABYLON {
          * @returns the JSON object
          */        
         public serialize(): any {
-            var serializationObject = super.serialize();;
+            var serializationObject = super.serialize();
 
-            serializationObject.direction1 = this.direction1.asArray();;
-            serializationObject.direction2 = this.direction2.asArray();;
+            serializationObject.direction1 = this.direction1.asArray();
+            serializationObject.direction2 = this.direction2.asArray();
 
             return serializationObject;
         }    

+ 4 - 3
src/Particles/babylon.solidParticleSystem.ts

@@ -200,10 +200,11 @@
                 vertexData.indices = (this._depthSort) ? this._indices : this._indices32;
                 vertexData.set(this._positions32, VertexBuffer.PositionKind);
                 vertexData.set(this._normals32, VertexBuffer.NormalKind);
-                if (this._uvs32) {
-                    vertexData.set(this._uvs32, VertexBuffer.UVKind);;
+
+                if (this._uvs32.length > 0) {
+                    vertexData.set(this._uvs32, VertexBuffer.UVKind);
                 }
-                if (this._colors32) {
+                if (this._colors32.length > 0) {
                     vertexData.set(this._colors32, VertexBuffer.ColorKind);
                 }
                 var mesh = new Mesh(this.name, this._scene);

+ 2 - 2
tests/unit/babylon/src/Loading/babylon.sceneLoader.tests.ts

@@ -260,11 +260,11 @@ describe('Babylon Scene Loader', function () {
 
                 const animationGroup = result.animationGroups[0];
                 expect(animationGroup.name, "animationGroup.name").to.equal("TwoTargetBlend");
-                expect(animationGroup.targetedAnimations, "animationGroup.targetedAnimations").to.have.lengthOf(19);
+                expect(animationGroup.targetedAnimations, "animationGroup.targetedAnimations").to.have.lengthOf(7);
                 const influenceAnimations = animationGroup.targetedAnimations.filter(_ => _.animation.targetProperty === "influence");
                 expect(influenceAnimations, "influenceAnimations").to.have.lengthOf(2);
                 const rotationAnimations = animationGroup.targetedAnimations.filter(_ => _.animation.targetProperty === "rotationQuaternion");
-                expect(rotationAnimations, "rotationAnimations").to.have.lengthOf(16);
+                expect(rotationAnimations, "rotationAnimations").to.have.lengthOf(4);
                 const positionAnimations = animationGroup.targetedAnimations.filter(_ => _.animation.targetProperty === "position");
                 expect(positionAnimations, "positionAnimations").to.have.lengthOf(1);
             });

BIN
tests/validation/ReferenceImages/assetContainer.png


BIN
tests/validation/ReferenceImages/pbrglossy.png


BIN
tests/validation/ReferenceImages/pbrrough.png