WIP: Upgrade to THREE.r155 - Fix the bug with TransformControls

Prior to this, any change caused by TransformControls would cause the SnapshotEditor's frameloop to halt
This commit is contained in:
Aria Minaei 2023-08-05 06:29:40 +02:00
parent 872b2f741f
commit 487573424c

View file

@ -49,8 +49,8 @@ const TransformControls = forwardRef(
}, [object, controls]) }, [object, controls])
useEffect(() => { useEffect(() => {
controls?.addEventListener?.('change', invalidate) controls?.addEventListener?.('change', () => invalidate())
return () => controls?.removeEventListener?.('change', invalidate) return () => controls?.removeEventListener?.('change', () => invalidate())
}, [controls, invalidate]) }, [controls, invalidate])
useEffect(() => { useEffect(() => {