This repository has been archived by the owner on May 11, 2023. It is now read-only.
controller.start, controller.pause, and controller.stop will act on all animations. #76
Labels
🐛 bug
Something isn't working
controller.start
,controller.pause
, andcontroller.stop
will run on all active animations, even those spurred by two disparate hooks. For example, if a view has multipleuseFriction
hooks running andcontroller.stop
is called, all animations will be stopped and animation state destroyed rather than just stopping the particular animation that corresponds to that hook's instance.This is likely a regression introduced through the use of our
animatingElements
Set
, which doesn't group elements according to the hook that called them, but rather bins them all in a singleSet
🤦 : https://github.com/FormidableLabs/renature/blob/saturn/src/animation/friction.ts#L74To fix this, we'll likely want to create a
class
of some kind to act as the central orchestrator of a particular hook instance's animation state.The text was updated successfully, but these errors were encountered: