Преглед на файлове

Merge pull request #1335 from Temechon/master

New compilation asked by @Nockawa and merged by me! What a team.
Raanan Weber преди 9 години
родител
ревизия
0591243dbb

Файловите разлики са ограничени, защото са твърде много
+ 30 - 22
dist/preview release/babylon.core.js


Файловите разлики са ограничени, защото са твърде много
+ 3712 - 3711
dist/preview release/babylon.d.ts


Файловите разлики са ограничени, защото са твърде много
+ 50 - 39
dist/preview release/babylon.js


Файловите разлики са ограничени, защото са твърде много
+ 1788 - 1785
dist/preview release/babylon.max.js


Файловите разлики са ограничени, защото са твърде много
+ 49 - 38
dist/preview release/babylon.noworker.js


+ 3 - 1
src/Canvas2d/babylon.prim2dBase.js

@@ -2535,6 +2535,7 @@ var BABYLON;
                     Prim2DBase._t1.multiplyToRef(Prim2DBase._t2, this._localTransform);
                 }
                 this.clearPropertiesDirty(tflags);
+                this._setFlags(BABYLON.SmartPropertyPrim.flagGlobalTransformDirty);
                 return true;
             }
             return false;
@@ -2614,7 +2615,7 @@ var BABYLON;
                 // Check if there are changes in the parent that will force us to update the global matrix
                 var parentDirty = (this._parent != null) ? (this._parent._globalTransformStep !== this._parentTransformStep) : false;
                 // Check if we have to update the globalTransform
-                if (!this._globalTransform || localDirty || parentDirty || parentPaddingChanged) {
+                if (!this._globalTransform || localDirty || parentDirty || parentPaddingChanged || this._areSomeFlagsSet(BABYLON.SmartPropertyPrim.flagGlobalTransformDirty)) {
                     var globalTransform = this._parent ? this._parent._globalTransform : null;
                     var localTransform;
                     Prim2DBase._transMtx.copyFrom(this._localTransform);
@@ -2625,6 +2626,7 @@ var BABYLON;
                     this._invGlobalTransform = BABYLON.Matrix.Invert(this._globalTransform);
                     this._globalTransformStep = this.owner._globalTransformProcessStep + 1;
                     this._parentTransformStep = this._parent ? this._parent._globalTransformStep : 0;
+                    this._clearFlags(BABYLON.SmartPropertyPrim.flagGlobalTransformDirty);
                 }
                 this._globalTransformProcessStep = this.owner._globalTransformProcessStep;
             }

+ 1 - 0
src/Canvas2d/babylon.smartPropertyPrim.js

@@ -558,6 +558,7 @@ var BABYLON;
         SmartPropertyPrim.flagNeedRefresh = 0x0020000; // set if the primitive wasn't successful at refresh
         SmartPropertyPrim.flagActualScaleDirty = 0x0040000; // set if the actualScale property needs to be recomputed
         SmartPropertyPrim.flagDontInheritParentScale = 0x0080000; // set if the actualScale must not use its parent's scale to be computed
+        SmartPropertyPrim.flagGlobalTransformDirty = 0x0100000; // set if the global transform must be recomputed due to a local transform change
         SmartPropertyPrim = __decorate([
             BABYLON.className("SmartPropertyPrim")
         ], SmartPropertyPrim);

+ 4 - 4
src/States/babylon.stencilState.js

@@ -132,12 +132,12 @@ var BABYLON;
             _StencilState.prototype.reset = function () {
                 this._stencilTest = false;
                 this._stencilMask = 0xFF;
-                this._stencilFunc = WebGLRenderingContext.ALWAYS;
+                this._stencilFunc = 0x0207; //WebGLRenderingContext.ALWAYS;
                 this._stencilFuncRef = 1;
                 this._stencilFuncMask = 0xFF;
-                this._stencilOpStencilFail = WebGLRenderingContext.KEEP;
-                this._stencilOpDepthFail = WebGLRenderingContext.KEEP;
-                this._stencilOpStencilDepthPass = WebGLRenderingContext.REPLACE;
+                this._stencilOpStencilFail = 0x1E00; //WebGLRenderingContext.KEEP;
+                this._stencilOpDepthFail = 0x1E00; //WebGLRenderingContext.KEEP;
+                this._stencilOpStencilDepthPass = 0x1E01; //WebGLRenderingContext.REPLACE;
                 this._isStencilTestDirty = true;
                 this._isStencilMaskDirty = true;
                 this._isStencilFuncDirty = true;