I have an element that triggers a specific animation when I hover over it. However, currently, the animation stops as soon as my pointer leaves the element. I would like the animation to continue playing until it reaches its last frame, rather than stopping when the mouse leaves the element. How can I achieve this?
<mesh
name="rond-ui-item-01"
geometry={nodes["rond-ui-item-01"].geometry}
material={materials["Material.019"]}
position={[-4.194373, 6.492984, 18.510574]}
rotation={[0, 0, -Math.PI / 2]}
scale={1.096397}
onPointerOver={() =>
(actions["UX-penceil-item_anim"].play().paused = false)
}
onPointerLeave={() =>
(actions["UX-penceil-item_anim"].play().paused = true)
}
/>