Explorar o código

Adding dispose for ReflectionProbe

David Catuhe %!s(int64=9) %!d(string=hai) anos
pai
achega
6e74305683

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 3077 - 3077
dist/preview release/babylon.d.ts


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 2
dist/preview release/babylon.js


+ 4 - 0
dist/preview release/babylon.max.js

@@ -36332,6 +36332,10 @@ var BABYLON;
                 // Remove from the scene if found 
                 this._scene.reflectionProbes.splice(index, 1);
             }
+            if (this._renderTargetTexture) {
+                this._renderTargetTexture.dispose();
+                this._renderTargetTexture = null;
+            }
         };
         return ReflectionProbe;
     })();

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 13 - 13
dist/preview release/babylon.noworker.js


+ 4 - 0
src/Probes/babylon.reflectionProbe.js

@@ -81,6 +81,10 @@ var BABYLON;
                 // Remove from the scene if found 
                 this._scene.reflectionProbes.splice(index, 1);
             }
+            if (this._renderTargetTexture) {
+                this._renderTargetTexture.dispose();
+                this._renderTargetTexture = null;
+            }
         };
         return ReflectionProbe;
     })();

+ 5 - 0
src/Probes/babylon.reflectionProbe.ts

@@ -89,6 +89,11 @@
                 // Remove from the scene if found 
                 this._scene.reflectionProbes.splice(index, 1);
             }            
+
+            if (this._renderTargetTexture) {
+                this._renderTargetTexture.dispose();
+                this._renderTargetTexture = null;
+            }
         }
     }    
 }