David Catuhe 6 anos atrás
pai
commit
a018b90708

Diferenças do arquivo suprimidas por serem muito extensas
+ 10968 - 10963
Playground/babylon.d.txt


Diferenças do arquivo suprimidas por serem muito extensas
+ 13468 - 13463
dist/preview release/babylon.d.ts


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
dist/preview release/babylon.js


+ 70 - 55
dist/preview release/babylon.max.js

@@ -3943,7 +3943,6 @@ var BABYLON;
             convertedColor.b = Math.pow(this.b, BABYLON.ToGammaSpace);
             return this;
         };
-        // Statics
         /**
          * Creates a new Color3 from the string containing valid hexadecimal values
          * @param hex defines a string containing valid hexadecimal values
@@ -4022,6 +4021,16 @@ var BABYLON;
          * @returns a new Color3 object
          */
         Color3.Black = function () { return new Color3(0, 0, 0); };
+        Object.defineProperty(Color3, "BlackReadOnly", {
+            /**
+              * Gets a Color3 value containing a black color that must not be updated
+              */
+            get: function () {
+                return Color3._BlackReadOnly;
+            },
+            enumerable: true,
+            configurable: true
+        });
         /**
          * Returns a Color3 value containing a white color
          * @returns a new Color3 object
@@ -4057,6 +4066,8 @@ var BABYLON;
          * @returns a new Color3 object
          */
         Color3.Random = function () { return new Color3(Math.random(), Math.random(), Math.random()); };
+        // Statics
+        Color3._BlackReadOnly = Color3.Black();
         return Color3;
     }());
     BABYLON.Color3 = Color3;
@@ -45132,7 +45143,7 @@ var BABYLON;
                     if (defines.SPECULARTERM) {
                         this._uniformBuffer.updateColor4("vSpecularColor", this.specularColor, this.specularPower);
                     }
-                    this._uniformBuffer.updateColor3("vEmissiveColor", this.emissiveColor);
+                    this._uniformBuffer.updateColor3("vEmissiveColor", StandardMaterial.EmissiveTextureEnabled ? this.emissiveColor : BABYLON.Color3.BlackReadOnly);
                     // Diffuse
                     this._uniformBuffer.updateColor4("vDiffuseColor", this.diffuseColor, this.alpha * mesh.visibility);
                 }
@@ -47505,7 +47516,7 @@ var BABYLON;
                     else {
                         this._uniformBuffer.updateColor4("vReflectivityColor", this._reflectivityColor, this._microSurface);
                     }
-                    this._uniformBuffer.updateColor3("vEmissiveColor", this._emissiveColor);
+                    this._uniformBuffer.updateColor3("vEmissiveColor", BABYLON.StandardMaterial.EmissiveTextureEnabled ? this._emissiveColor : BABYLON.Color3.BlackReadOnly);
                     this._uniformBuffer.updateColor3("vReflectionColor", this._reflectionColor);
                     this._uniformBuffer.updateColor4("vAlbedoColor", this._albedoColor, this.alpha * mesh.visibility);
                     // Misc
@@ -49834,31 +49845,33 @@ var BABYLON;
             });
             this._onKeyboardObserver = this._scene.onKeyboardObservable.add(function (info) {
                 var evt = info.event;
-                if (info.type === BABYLON.KeyboardEventTypes.KEYDOWN) {
-                    if (_this.keysUp.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysDown.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysLeft.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysRight.indexOf(evt.keyCode) !== -1) {
-                        var index = _this._keys.indexOf(evt.keyCode);
-                        if (index === -1) {
-                            _this._keys.push(evt.keyCode);
-                        }
-                        if (!noPreventDefault) {
-                            evt.preventDefault();
+                if (!evt.metaKey) {
+                    if (info.type === BABYLON.KeyboardEventTypes.KEYDOWN) {
+                        if (_this.keysUp.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysDown.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysLeft.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysRight.indexOf(evt.keyCode) !== -1) {
+                            var index = _this._keys.indexOf(evt.keyCode);
+                            if (index === -1) {
+                                _this._keys.push(evt.keyCode);
+                            }
+                            if (!noPreventDefault) {
+                                evt.preventDefault();
+                            }
                         }
                     }
-                }
-                else {
-                    if (_this.keysUp.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysDown.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysLeft.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysRight.indexOf(evt.keyCode) !== -1) {
-                        var index = _this._keys.indexOf(evt.keyCode);
-                        if (index >= 0) {
-                            _this._keys.splice(index, 1);
-                        }
-                        if (!noPreventDefault) {
-                            evt.preventDefault();
+                    else {
+                        if (_this.keysUp.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysDown.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysLeft.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysRight.indexOf(evt.keyCode) !== -1) {
+                            var index = _this._keys.indexOf(evt.keyCode);
+                            if (index >= 0) {
+                                _this._keys.splice(index, 1);
+                            }
+                            if (!noPreventDefault) {
+                                evt.preventDefault();
+                            }
                         }
                     }
                 }
@@ -51252,38 +51265,40 @@ var BABYLON;
             });
             this._onKeyboardObserver = this._scene.onKeyboardObservable.add(function (info) {
                 var evt = info.event;
-                if (info.type === BABYLON.KeyboardEventTypes.KEYDOWN) {
-                    _this._ctrlPressed = evt.ctrlKey;
-                    _this._altPressed = evt.altKey;
-                    if (_this.keysUp.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysDown.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysLeft.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysRight.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysReset.indexOf(evt.keyCode) !== -1) {
-                        var index = _this._keys.indexOf(evt.keyCode);
-                        if (index === -1) {
-                            _this._keys.push(evt.keyCode);
-                        }
-                        if (evt.preventDefault) {
-                            if (!noPreventDefault) {
-                                evt.preventDefault();
+                if (!evt.metaKey) {
+                    if (info.type === BABYLON.KeyboardEventTypes.KEYDOWN) {
+                        _this._ctrlPressed = evt.ctrlKey;
+                        _this._altPressed = evt.altKey;
+                        if (_this.keysUp.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysDown.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysLeft.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysRight.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysReset.indexOf(evt.keyCode) !== -1) {
+                            var index = _this._keys.indexOf(evt.keyCode);
+                            if (index === -1) {
+                                _this._keys.push(evt.keyCode);
+                            }
+                            if (evt.preventDefault) {
+                                if (!noPreventDefault) {
+                                    evt.preventDefault();
+                                }
                             }
                         }
                     }
-                }
-                else {
-                    if (_this.keysUp.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysDown.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysLeft.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysRight.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysReset.indexOf(evt.keyCode) !== -1) {
-                        var index = _this._keys.indexOf(evt.keyCode);
-                        if (index >= 0) {
-                            _this._keys.splice(index, 1);
-                        }
-                        if (evt.preventDefault) {
-                            if (!noPreventDefault) {
-                                evt.preventDefault();
+                    else {
+                        if (_this.keysUp.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysDown.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysLeft.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysRight.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysReset.indexOf(evt.keyCode) !== -1) {
+                            var index = _this._keys.indexOf(evt.keyCode);
+                            if (index >= 0) {
+                                _this._keys.splice(index, 1);
+                            }
+                            if (evt.preventDefault) {
+                                if (!noPreventDefault) {
+                                    evt.preventDefault();
+                                }
                             }
                         }
                     }

+ 70 - 55
dist/preview release/babylon.no-module.max.js

@@ -3910,7 +3910,6 @@ var BABYLON;
             convertedColor.b = Math.pow(this.b, BABYLON.ToGammaSpace);
             return this;
         };
-        // Statics
         /**
          * Creates a new Color3 from the string containing valid hexadecimal values
          * @param hex defines a string containing valid hexadecimal values
@@ -3989,6 +3988,16 @@ var BABYLON;
          * @returns a new Color3 object
          */
         Color3.Black = function () { return new Color3(0, 0, 0); };
+        Object.defineProperty(Color3, "BlackReadOnly", {
+            /**
+              * Gets a Color3 value containing a black color that must not be updated
+              */
+            get: function () {
+                return Color3._BlackReadOnly;
+            },
+            enumerable: true,
+            configurable: true
+        });
         /**
          * Returns a Color3 value containing a white color
          * @returns a new Color3 object
@@ -4024,6 +4033,8 @@ var BABYLON;
          * @returns a new Color3 object
          */
         Color3.Random = function () { return new Color3(Math.random(), Math.random(), Math.random()); };
+        // Statics
+        Color3._BlackReadOnly = Color3.Black();
         return Color3;
     }());
     BABYLON.Color3 = Color3;
@@ -45099,7 +45110,7 @@ var BABYLON;
                     if (defines.SPECULARTERM) {
                         this._uniformBuffer.updateColor4("vSpecularColor", this.specularColor, this.specularPower);
                     }
-                    this._uniformBuffer.updateColor3("vEmissiveColor", this.emissiveColor);
+                    this._uniformBuffer.updateColor3("vEmissiveColor", StandardMaterial.EmissiveTextureEnabled ? this.emissiveColor : BABYLON.Color3.BlackReadOnly);
                     // Diffuse
                     this._uniformBuffer.updateColor4("vDiffuseColor", this.diffuseColor, this.alpha * mesh.visibility);
                 }
@@ -47472,7 +47483,7 @@ var BABYLON;
                     else {
                         this._uniformBuffer.updateColor4("vReflectivityColor", this._reflectivityColor, this._microSurface);
                     }
-                    this._uniformBuffer.updateColor3("vEmissiveColor", this._emissiveColor);
+                    this._uniformBuffer.updateColor3("vEmissiveColor", BABYLON.StandardMaterial.EmissiveTextureEnabled ? this._emissiveColor : BABYLON.Color3.BlackReadOnly);
                     this._uniformBuffer.updateColor3("vReflectionColor", this._reflectionColor);
                     this._uniformBuffer.updateColor4("vAlbedoColor", this._albedoColor, this.alpha * mesh.visibility);
                     // Misc
@@ -49801,31 +49812,33 @@ var BABYLON;
             });
             this._onKeyboardObserver = this._scene.onKeyboardObservable.add(function (info) {
                 var evt = info.event;
-                if (info.type === BABYLON.KeyboardEventTypes.KEYDOWN) {
-                    if (_this.keysUp.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysDown.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysLeft.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysRight.indexOf(evt.keyCode) !== -1) {
-                        var index = _this._keys.indexOf(evt.keyCode);
-                        if (index === -1) {
-                            _this._keys.push(evt.keyCode);
-                        }
-                        if (!noPreventDefault) {
-                            evt.preventDefault();
+                if (!evt.metaKey) {
+                    if (info.type === BABYLON.KeyboardEventTypes.KEYDOWN) {
+                        if (_this.keysUp.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysDown.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysLeft.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysRight.indexOf(evt.keyCode) !== -1) {
+                            var index = _this._keys.indexOf(evt.keyCode);
+                            if (index === -1) {
+                                _this._keys.push(evt.keyCode);
+                            }
+                            if (!noPreventDefault) {
+                                evt.preventDefault();
+                            }
                         }
                     }
-                }
-                else {
-                    if (_this.keysUp.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysDown.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysLeft.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysRight.indexOf(evt.keyCode) !== -1) {
-                        var index = _this._keys.indexOf(evt.keyCode);
-                        if (index >= 0) {
-                            _this._keys.splice(index, 1);
-                        }
-                        if (!noPreventDefault) {
-                            evt.preventDefault();
+                    else {
+                        if (_this.keysUp.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysDown.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysLeft.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysRight.indexOf(evt.keyCode) !== -1) {
+                            var index = _this._keys.indexOf(evt.keyCode);
+                            if (index >= 0) {
+                                _this._keys.splice(index, 1);
+                            }
+                            if (!noPreventDefault) {
+                                evt.preventDefault();
+                            }
                         }
                     }
                 }
@@ -51219,38 +51232,40 @@ var BABYLON;
             });
             this._onKeyboardObserver = this._scene.onKeyboardObservable.add(function (info) {
                 var evt = info.event;
-                if (info.type === BABYLON.KeyboardEventTypes.KEYDOWN) {
-                    _this._ctrlPressed = evt.ctrlKey;
-                    _this._altPressed = evt.altKey;
-                    if (_this.keysUp.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysDown.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysLeft.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysRight.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysReset.indexOf(evt.keyCode) !== -1) {
-                        var index = _this._keys.indexOf(evt.keyCode);
-                        if (index === -1) {
-                            _this._keys.push(evt.keyCode);
-                        }
-                        if (evt.preventDefault) {
-                            if (!noPreventDefault) {
-                                evt.preventDefault();
+                if (!evt.metaKey) {
+                    if (info.type === BABYLON.KeyboardEventTypes.KEYDOWN) {
+                        _this._ctrlPressed = evt.ctrlKey;
+                        _this._altPressed = evt.altKey;
+                        if (_this.keysUp.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysDown.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysLeft.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysRight.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysReset.indexOf(evt.keyCode) !== -1) {
+                            var index = _this._keys.indexOf(evt.keyCode);
+                            if (index === -1) {
+                                _this._keys.push(evt.keyCode);
+                            }
+                            if (evt.preventDefault) {
+                                if (!noPreventDefault) {
+                                    evt.preventDefault();
+                                }
                             }
                         }
                     }
-                }
-                else {
-                    if (_this.keysUp.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysDown.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysLeft.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysRight.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysReset.indexOf(evt.keyCode) !== -1) {
-                        var index = _this._keys.indexOf(evt.keyCode);
-                        if (index >= 0) {
-                            _this._keys.splice(index, 1);
-                        }
-                        if (evt.preventDefault) {
-                            if (!noPreventDefault) {
-                                evt.preventDefault();
+                    else {
+                        if (_this.keysUp.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysDown.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysLeft.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysRight.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysReset.indexOf(evt.keyCode) !== -1) {
+                            var index = _this._keys.indexOf(evt.keyCode);
+                            if (index >= 0) {
+                                _this._keys.splice(index, 1);
+                            }
+                            if (evt.preventDefault) {
+                                if (!noPreventDefault) {
+                                    evt.preventDefault();
+                                }
                             }
                         }
                     }

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
dist/preview release/babylon.worker.js


+ 70 - 55
dist/preview release/es6.js

@@ -3910,7 +3910,6 @@ var BABYLON;
             convertedColor.b = Math.pow(this.b, BABYLON.ToGammaSpace);
             return this;
         };
-        // Statics
         /**
          * Creates a new Color3 from the string containing valid hexadecimal values
          * @param hex defines a string containing valid hexadecimal values
@@ -3989,6 +3988,16 @@ var BABYLON;
          * @returns a new Color3 object
          */
         Color3.Black = function () { return new Color3(0, 0, 0); };
+        Object.defineProperty(Color3, "BlackReadOnly", {
+            /**
+              * Gets a Color3 value containing a black color that must not be updated
+              */
+            get: function () {
+                return Color3._BlackReadOnly;
+            },
+            enumerable: true,
+            configurable: true
+        });
         /**
          * Returns a Color3 value containing a white color
          * @returns a new Color3 object
@@ -4024,6 +4033,8 @@ var BABYLON;
          * @returns a new Color3 object
          */
         Color3.Random = function () { return new Color3(Math.random(), Math.random(), Math.random()); };
+        // Statics
+        Color3._BlackReadOnly = Color3.Black();
         return Color3;
     }());
     BABYLON.Color3 = Color3;
@@ -45099,7 +45110,7 @@ var BABYLON;
                     if (defines.SPECULARTERM) {
                         this._uniformBuffer.updateColor4("vSpecularColor", this.specularColor, this.specularPower);
                     }
-                    this._uniformBuffer.updateColor3("vEmissiveColor", this.emissiveColor);
+                    this._uniformBuffer.updateColor3("vEmissiveColor", StandardMaterial.EmissiveTextureEnabled ? this.emissiveColor : BABYLON.Color3.BlackReadOnly);
                     // Diffuse
                     this._uniformBuffer.updateColor4("vDiffuseColor", this.diffuseColor, this.alpha * mesh.visibility);
                 }
@@ -47472,7 +47483,7 @@ var BABYLON;
                     else {
                         this._uniformBuffer.updateColor4("vReflectivityColor", this._reflectivityColor, this._microSurface);
                     }
-                    this._uniformBuffer.updateColor3("vEmissiveColor", this._emissiveColor);
+                    this._uniformBuffer.updateColor3("vEmissiveColor", BABYLON.StandardMaterial.EmissiveTextureEnabled ? this._emissiveColor : BABYLON.Color3.BlackReadOnly);
                     this._uniformBuffer.updateColor3("vReflectionColor", this._reflectionColor);
                     this._uniformBuffer.updateColor4("vAlbedoColor", this._albedoColor, this.alpha * mesh.visibility);
                     // Misc
@@ -49801,31 +49812,33 @@ var BABYLON;
             });
             this._onKeyboardObserver = this._scene.onKeyboardObservable.add(function (info) {
                 var evt = info.event;
-                if (info.type === BABYLON.KeyboardEventTypes.KEYDOWN) {
-                    if (_this.keysUp.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysDown.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysLeft.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysRight.indexOf(evt.keyCode) !== -1) {
-                        var index = _this._keys.indexOf(evt.keyCode);
-                        if (index === -1) {
-                            _this._keys.push(evt.keyCode);
-                        }
-                        if (!noPreventDefault) {
-                            evt.preventDefault();
+                if (!evt.metaKey) {
+                    if (info.type === BABYLON.KeyboardEventTypes.KEYDOWN) {
+                        if (_this.keysUp.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysDown.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysLeft.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysRight.indexOf(evt.keyCode) !== -1) {
+                            var index = _this._keys.indexOf(evt.keyCode);
+                            if (index === -1) {
+                                _this._keys.push(evt.keyCode);
+                            }
+                            if (!noPreventDefault) {
+                                evt.preventDefault();
+                            }
                         }
                     }
-                }
-                else {
-                    if (_this.keysUp.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysDown.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysLeft.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysRight.indexOf(evt.keyCode) !== -1) {
-                        var index = _this._keys.indexOf(evt.keyCode);
-                        if (index >= 0) {
-                            _this._keys.splice(index, 1);
-                        }
-                        if (!noPreventDefault) {
-                            evt.preventDefault();
+                    else {
+                        if (_this.keysUp.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysDown.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysLeft.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysRight.indexOf(evt.keyCode) !== -1) {
+                            var index = _this._keys.indexOf(evt.keyCode);
+                            if (index >= 0) {
+                                _this._keys.splice(index, 1);
+                            }
+                            if (!noPreventDefault) {
+                                evt.preventDefault();
+                            }
                         }
                     }
                 }
@@ -51219,38 +51232,40 @@ var BABYLON;
             });
             this._onKeyboardObserver = this._scene.onKeyboardObservable.add(function (info) {
                 var evt = info.event;
-                if (info.type === BABYLON.KeyboardEventTypes.KEYDOWN) {
-                    _this._ctrlPressed = evt.ctrlKey;
-                    _this._altPressed = evt.altKey;
-                    if (_this.keysUp.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysDown.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysLeft.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysRight.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysReset.indexOf(evt.keyCode) !== -1) {
-                        var index = _this._keys.indexOf(evt.keyCode);
-                        if (index === -1) {
-                            _this._keys.push(evt.keyCode);
-                        }
-                        if (evt.preventDefault) {
-                            if (!noPreventDefault) {
-                                evt.preventDefault();
+                if (!evt.metaKey) {
+                    if (info.type === BABYLON.KeyboardEventTypes.KEYDOWN) {
+                        _this._ctrlPressed = evt.ctrlKey;
+                        _this._altPressed = evt.altKey;
+                        if (_this.keysUp.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysDown.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysLeft.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysRight.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysReset.indexOf(evt.keyCode) !== -1) {
+                            var index = _this._keys.indexOf(evt.keyCode);
+                            if (index === -1) {
+                                _this._keys.push(evt.keyCode);
+                            }
+                            if (evt.preventDefault) {
+                                if (!noPreventDefault) {
+                                    evt.preventDefault();
+                                }
                             }
                         }
                     }
-                }
-                else {
-                    if (_this.keysUp.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysDown.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysLeft.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysRight.indexOf(evt.keyCode) !== -1 ||
-                        _this.keysReset.indexOf(evt.keyCode) !== -1) {
-                        var index = _this._keys.indexOf(evt.keyCode);
-                        if (index >= 0) {
-                            _this._keys.splice(index, 1);
-                        }
-                        if (evt.preventDefault) {
-                            if (!noPreventDefault) {
-                                evt.preventDefault();
+                    else {
+                        if (_this.keysUp.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysDown.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysLeft.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysRight.indexOf(evt.keyCode) !== -1 ||
+                            _this.keysReset.indexOf(evt.keyCode) !== -1) {
+                            var index = _this._keys.indexOf(evt.keyCode);
+                            if (index >= 0) {
+                                _this._keys.splice(index, 1);
+                            }
+                            if (evt.preventDefault) {
+                                if (!noPreventDefault) {
+                                    evt.preventDefault();
+                                }
                             }
                         }
                     }

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
dist/preview release/gui/babylon.gui.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
dist/preview release/gui/babylon.gui.min.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
dist/preview release/gui/babylon.gui.min.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
dist/preview release/viewer/babylon.viewer.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
dist/preview release/viewer/babylon.viewer.max.js


+ 1 - 1
src/Materials/PBR/babylon.pbrBaseMaterial.ts

@@ -1584,7 +1584,7 @@ module BABYLON {
                         this._uniformBuffer.updateColor4("vReflectivityColor", this._reflectivityColor, this._microSurface);
                     }
 
-                    this._uniformBuffer.updateColor3("vEmissiveColor", this._emissiveColor);
+                    this._uniformBuffer.updateColor3("vEmissiveColor", StandardMaterial.EmissiveTextureEnabled ? this._emissiveColor : Color3.BlackReadOnly);
                     this._uniformBuffer.updateColor3("vReflectionColor", this._reflectionColor);
                     this._uniformBuffer.updateColor4("vAlbedoColor", this._albedoColor, this.alpha * mesh.visibility);
 

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

@@ -1362,7 +1362,7 @@ module BABYLON {
                     if (defines.SPECULARTERM) {
                         this._uniformBuffer.updateColor4("vSpecularColor", this.specularColor, this.specularPower);
                     }
-                    this._uniformBuffer.updateColor3("vEmissiveColor", this.emissiveColor);
+                    this._uniformBuffer.updateColor3("vEmissiveColor", StandardMaterial.EmissiveTextureEnabled ? this.emissiveColor : Color3.BlackReadOnly);
 
                     // Diffuse
                     this._uniformBuffer.updateColor4("vDiffuseColor", this.diffuseColor, this.alpha * mesh.visibility);

+ 10 - 0
src/Math/babylon.math.ts

@@ -348,6 +348,8 @@ module BABYLON {
 
         // Statics
 
+        private static _BlackReadOnly = Color3.Black() as DeepImmutable<Color3>;
+
         /**
          * Creates a new Color3 from the string containing valid hexadecimal values
          * @param hex defines a string containing valid hexadecimal values
@@ -432,6 +434,14 @@ module BABYLON {
          * @returns a new Color3 object
          */
         public static Black(): Color3 { return new Color3(0, 0, 0); }
+
+        /**
+          * Gets a Color3 value containing a black color that must not be updated
+          */
+        public static get BlackReadOnly(): DeepImmutable<Color3> {
+            return Color3._BlackReadOnly;
+        }
+
         /**
          * Returns a Color3 value containing a white color
          * @returns a new Color3 object