Closed
Description
👋 hi
I want to use react-three-fiber
to draw something like this:
elements.map(element =>
<mesh material={elementMaterial}>
<shapeBufferGeometry>
</mesh>
)
when count of elements update, there will generate all new element again and can't dispose old geometry, I try to use useEffect
to solve this problem but not work like this:
const map = () => { useEffect(() => { return function ref.current.geometry.dispose() }, []); }
Metadata
Metadata
Assignees
Labels
No labels