Browse Source

Fix gpu.dispose()

David Catuhe 7 năm trước cách đây
mục cha
commit
04ddd5a61f
1 tập tin đã thay đổi với 6 bổ sung1 xóa
  1. 6 1
      src/Particles/babylon.gpuParticleSystem.ts

+ 6 - 1
src/Particles/babylon.gpuParticleSystem.ts

@@ -1194,7 +1194,12 @@
             if (this._limitVelocityGradientsTexture) {
                 this._limitVelocityGradientsTexture.dispose();
                 (<any>this._limitVelocityGradientsTexture) = null;
-            }         
+            }                   
+
+            if (this._dragGradientsTexture) {
+                this._dragGradientsTexture.dispose();
+                (<any>this._dragGradientsTexture) = null;
+            }               
          
             if (this._randomTexture) {
                 this._randomTexture.dispose();