From 1244132d09e225011d0c4a6855ebb200a7a1e939 Mon Sep 17 00:00:00 2001 From: wulimao49 <73568161+wulimao49@users.noreply.github.com> Date: Mon, 30 Oct 2023 19:03:12 +0800 Subject: [PATCH] fix(ium): remove listener on dispose --- .../three-instanced-uniforms-mesh/src/InstancedUniformsMesh.js | 1 + 1 file changed, 1 insertion(+) 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() }) }