Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nodes: Add missing dispose() methods. #28892

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/nodes/display/AfterImageNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,13 @@ class AfterImageNode extends TempNode {

}

dispose() {

this._compRT.dispose();
this._oldRT.dispose();

}

}

export const afterImage = ( node, damp ) => nodeObject( new AfterImageNode( nodeObject( node ).toTexture(), damp ) );
Expand Down
6 changes: 6 additions & 0 deletions src/nodes/display/AnamorphicNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ class AnamorphicNode extends TempNode {

}

dispose() {

this._renderTarget.dispose();

}

}

export const anamorphic = ( node, threshold = .9, scale = 3, samples = 32 ) => nodeObject( new AnamorphicNode( nodeObject( node ).toTexture(), nodeObject( threshold ), nodeObject( scale ), samples ) );
Expand Down
6 changes: 6 additions & 0 deletions src/nodes/display/GTAONode.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,12 @@ class GTAONode extends TempNode {

}

dispose() {

this._aoRenderTarget.dispose();

}

}

function generateMagicSquareNoise( size = 5 ) {
Expand Down
7 changes: 7 additions & 0 deletions src/nodes/display/GaussianBlurNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,13 @@ class GaussianBlurNode extends TempNode {

}

dispose() {

this._horizontalRT.dispose();
this._verticalRT.dispose();

}

_getCoefficients( kernelRadius ) {

const coefficients = [];
Expand Down