Pārlūkot izejas kodu

Remove unneeded member

Michael Bond 5 gadi atpakaļ
vecāks
revīzija
5bdeeb270e

+ 1 - 21
loaders/src/glTF/2.0/Extensions/KHR_materials_transmission.ts

@@ -44,8 +44,6 @@ class TransmissionHelper {
     private _opaqueMeshesCache: Mesh[] = [];
     private _transparentMeshesCache: Mesh[] = [];
 
-    private enabled: boolean = true;
-
     /**
      * This observable will be notified with any error during the creation of the environment,
      * mainly texture creation errors.
@@ -79,10 +77,7 @@ class TransmissionHelper {
         if (!newValues.length) {
             return;
         }
-        if (!this.enabled) {
-            return;
-        }
-
+        
         const newOptions = {
             ...this._options,
             ...options
@@ -120,11 +115,6 @@ class TransmissionHelper {
                 this._opaqueMeshesCache.push(mesh);
             }
         }
-        if (this._transparentMeshesCache.length == 0) {
-            this.enabled = false;
-        } else {
-            this.enabled = true;
-        }
     }
 
     private _removeMesh(mesh: AbstractMesh): void {
@@ -139,11 +129,6 @@ class TransmissionHelper {
                 this._opaqueMeshesCache.splice(idx, 1);
             }
         }
-        if (this._transparentMeshesCache.length == 0) {
-            this.enabled = false;
-        } else {
-            this.enabled = true;
-        }
     }
 
     private _parseScene(): void {
@@ -182,11 +167,6 @@ class TransmissionHelper {
                 }
             }
         }
-        if (this._transparentMeshesCache.length == 0) {
-            this.enabled = false;
-        } else {
-            this.enabled = true;
-        }
     }
 
     /**

+ 1 - 1
package.json

@@ -113,4 +113,4 @@
         "xhr2": "^0.2.0",
         "xmlbuilder": "15.1.1"
     }
-}
+}