Browse Source

Remove unneeded member

Michael Bond 5 years ago
parent
commit
5bdeeb270e
2 changed files with 2 additions and 22 deletions
  1. 1 21
      loaders/src/glTF/2.0/Extensions/KHR_materials_transmission.ts
  2. 1 1
      package.json

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

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