Selaa lähdekoodia

Fix small issues with stdMat

David Catuhe 8 vuotta sitten
vanhempi
commit
f84ee6a12c

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 9 - 9
dist/preview release/babylon.core.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 3960 - 3960
dist/preview release/babylon.d.ts


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 14 - 14
dist/preview release/babylon.js


+ 8 - 6
dist/preview release/babylon.max.js

@@ -31855,11 +31855,13 @@ var BABYLON;
             return true;
         };
         StandardMaterial.prototype.unbind = function () {
-            if (this._reflectionTexture && this._reflectionTexture.isRenderTarget) {
-                this._activeEffect.setTexture("reflection2DSampler", null);
-            }
-            if (this._refractionTexture && this._refractionTexture.isRenderTarget) {
-                this._activeEffect.setTexture("refraction2DSampler", null);
+            if (this._activeEffect) {
+                if (this._reflectionTexture && this._reflectionTexture.isRenderTarget) {
+                    this._activeEffect.setTexture("reflection2DSampler", null);
+                }
+                if (this._refractionTexture && this._refractionTexture.isRenderTarget) {
+                    this._activeEffect.setTexture("refraction2DSampler", null);
+                }
             }
             _super.prototype.unbind.call(this);
         };
@@ -58384,7 +58386,7 @@ var BABYLON;
     })(Internals = BABYLON.Internals || (BABYLON.Internals = {}));
 })(BABYLON || (BABYLON = {}));
 
-//# sourceMappingURL=babylon.tools.pmremGenerator.js.map
+//# sourceMappingURL=babylon.tools.pmremgenerator.js.map
 
 
 var BABYLON;

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 3960 - 3960
dist/preview release/babylon.module.d.ts


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 14 - 14
dist/preview release/babylon.noworker.js


+ 7 - 5
src/Materials/babylon.standardMaterial.ts

@@ -1052,12 +1052,14 @@ module BABYLON {
         }
 
         public unbind(): void {
-            if (this._reflectionTexture && this._reflectionTexture.isRenderTarget) {
-                this._activeEffect.setTexture("reflection2DSampler", null);
-            }
+            if (this._activeEffect) {
+                if (this._reflectionTexture && this._reflectionTexture.isRenderTarget) {
+                    this._activeEffect.setTexture("reflection2DSampler", null);
+                }
 
-            if (this._refractionTexture && this._refractionTexture.isRenderTarget) {
-                this._activeEffect.setTexture("refraction2DSampler", null);
+                if (this._refractionTexture && this._refractionTexture.isRenderTarget) {
+                    this._activeEffect.setTexture("refraction2DSampler", null);
+                }
             }
 
             super.unbind();