#963·popmotion

Disable easing in and out

Author: kaligrafyCreated Sep 23, 2024Updated Sep 28, 2024

I search in all the documentation and I don't see how to completely disable easing in and out. Here are my settings:

const loopLength = 1000;
const animationSpeed = 100;
const [currentTime, setCurrentTime] = useState<number>(0);

useEffect(() => {
        const animation = animate({
            from: 0,
            to: loopLength,
            duration: loopLength,
            repeat: Infinity,
            onUpdate: setCurrentTime,
        });
        return () => animation.stop();
}, [loopLength, animationSpeed]);

How can I just get an animated arrow path, with a constant speed and no acceleration and deceleration between each loop?

Here is the current result, which includes an unwanted acceleration and deceleration: https://github.com/user-attachments/assets/31365ef9-19f1-4365-b647-f6fa85794d05

Thanks!