Skip to content

Disable easing in and out #963

@kaligrafy

Description

@kaligrafy

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions