fix memory leak

see also https://github.com/mrdoob/three.js/issues/20346
This commit is contained in:
Haowei Wen 2020-09-16 22:34:22 +08:00
parent c8ddc277eb
commit 798a111ade
No known key found for this signature in database
GPG Key ID: 5BC167F73EA558E4
1 changed files with 6 additions and 0 deletions

View File

@ -1,4 +1,5 @@
import { EffectComposer } from "three/examples/jsm/postprocessing/EffectComposer.js";
import { Pass } from "three/examples/jsm/postprocessing/Pass.js";
import { RenderPass } from "three/examples/jsm/postprocessing/RenderPass.js";
import { ShaderPass } from "three/examples/jsm/postprocessing/ShaderPass.js";
import { FXAAShader } from "three/examples/jsm/shaders/FXAAShader.js";
@ -42,4 +43,9 @@ export class FXAASkinViewer extends SkinViewer {
render(): void {
this.composer.render();
}
dispose(): void {
super.dispose();
(this.fxaaPass.fsQuad as Pass.FullScreenQuad).dispose();
}
}