Skip to content

When I apply the animation, it starts to slow down #146

@rtkirill

Description

@rtkirill

Hey there!

I'm attempting to slow down the animation when hovering over a motion element.

Here's my motion instance code:

motionInstance.value = useMotion(motionElement, {
      initial: {
        x: 0,
      },
      enter: {
        x: direction.value * motionElement.value.offsetWidth,
        transition: {
          repeat: Infinity,
          duration: 5000,
          ease: "linear"
        }
      }
})

I use motionInstance.value.stop() when the @mouseenter event is triggered and motionInstance.value.apply("enter") when the @Mouseleave event is called.

However, each time I hover over the element, the apply method slows down the animation more and more.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions