Ver código fonte

initialize arrays

Trevor Baron 6 anos atrás
pai
commit
0badcc3ffe
2 arquivos alterados com 7 adições e 7 exclusões
  1. 0 5
      src/babylon.abstractScene.ts
  2. 7 2
      src/babylon.assetContainer.ts

+ 0 - 5
src/babylon.abstractScene.ts

@@ -174,10 +174,5 @@ module BABYLON {
          * Textures to keep.
          */
         public textures = new Array<BaseTexture>();
-
-        /**
-         * Effect layers in the scene.
-         */
-        public effectLayers = new Array<EffectLayer>();
     }
 }

+ 7 - 2
src/babylon.assetContainer.ts

@@ -20,6 +20,11 @@ module BABYLON {
         constructor(scene: Scene) {
             super();
             this.scene = scene;
+            this["sounds"] = [];
+            this["effectLayers"] = [];
+            this["layers"] = [];
+            this["lensFlareSystems"] = [];
+            this["proceduralTextures"] = [];
         }
 
         /**
@@ -65,7 +70,7 @@ module BABYLON {
             this.textures.forEach((o) => {
                 this.scene.addTexture(o);
             });
-            
+
             for (let component of this.scene._serializableComponents) {
                 component.addFromContainer(this);
             }
@@ -114,7 +119,7 @@ module BABYLON {
             this.textures.forEach((o) => {
                 this.scene.removeTexture(o);
             });
-            
+
             for (let component of this.scene._serializableComponents) {
                 component.removeFromContainer(this);
             }