Skip to content

Commit

Permalink
fix(instanced-uniforms-mesh): remove listener on dispose (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
wulimao49 committed Oct 30, 2023
1 parent c51cb70 commit 336075d
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export class InstancedUniformsMesh extends InstancedMesh {
derivedGeom.attributes = Object.create(baseGeom.attributes)
// dispose the derived geometry when its base geometry is disposed:
baseGeom.addEventListener('dispose', function onDispose () {
baseGeom.removeEventListener('dispose', onDispose)
derivedGeom.dispose()
})
}
Expand Down

0 comments on commit 336075d

Please sign in to comment.