File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,13 @@ class EffectComposer<TRenderTarget extends WebGLRenderTarget = WebGLRenderTarget
195
195
196
196
this . setSize ( this . _width , this . _height )
197
197
}
198
+
199
+ public dispose ( ) {
200
+ this . renderTarget1 . dispose ( )
201
+ this . renderTarget2 . dispose ( )
202
+
203
+ this . copyPass . dispose ( )
204
+ }
198
205
}
199
206
200
207
export { EffectComposer }
Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ class Pass {
24
24
) : void {
25
25
console . error ( 'THREE.Pass: .render() must be implemented in derived pass.' )
26
26
}
27
+
28
+ public dispose ( ) { }
27
29
}
28
30
29
31
// Helper for passes that need to fill the viewport with a single quad.
Original file line number Diff line number Diff line change @@ -52,6 +52,11 @@ class ShaderPass extends Pass {
52
52
this . fsQuad . render ( renderer )
53
53
}
54
54
}
55
+
56
+ public dispose ( ) {
57
+ this . fsQuad . dispose ( )
58
+ this . material . dispose ( )
59
+ }
55
60
}
56
61
57
62
export { ShaderPass }
You can’t perform that action at this time.
0 commit comments