diff --git a/packages/three-instanced-uniforms-mesh/src/InstancedUniformsMesh.js b/packages/three-instanced-uniforms-mesh/src/InstancedUniformsMesh.js index 704e31a9..9d554c08 100644 --- a/packages/three-instanced-uniforms-mesh/src/InstancedUniformsMesh.js +++ b/packages/three-instanced-uniforms-mesh/src/InstancedUniformsMesh.js @@ -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() }) }