Skip to content

Commit

Permalink
WebGLBackground: Reset meshes in dispose(). (#30257)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugen87 authored Jan 3, 2025
1 parent 99eae50 commit 880d23e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/renderers/webgl/WebGLBackground.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,17 @@ function WebGLBackground( renderer, cubemaps, cubeuvmaps, state, objects, alpha,
boxMesh.geometry.dispose();
boxMesh.material.dispose();

boxMesh = undefined;

}

if ( planeMesh !== undefined ) {

planeMesh.geometry.dispose();
planeMesh.material.dispose();

planeMesh = undefined;

}

}
Expand Down

0 comments on commit 880d23e

Please sign in to comment.