Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Add anticipation to the animation #37

Open
ColinKennedy opened this issue Dec 2, 2024 · 2 comments
Open

feature: Add anticipation to the animation #37

ColinKennedy opened this issue Dec 2, 2024 · 2 comments
Labels
enhancement New feature or enhancement

Comments

@ColinKennedy
Copy link

ColinKennedy commented Dec 2, 2024

Currently, the cursor moves from point A to point B in a straight line. To make the cursor feel more organic and alive, it'd be awesome to add some anticipation to the transition animation.

Here's a visual to explain: https://www.youtube.com/watch?v=7KRjpIkMw2k

Before any movement, there is a period of "gathering energy" where the subject actually has to move in the opposite direction, at least a little bit.

Before:

                1
    A ----------------------> B

After:

 1              2
<-- A ----------------------> B

It also increases the "impact" on the viewer because the cursor would travel further in less time.

It'd be cool if this is customizable in smear-cursor's settings. e.g. opts = { movement = { anticipation = 0.05 } } as in "for every movement, move 5% in the other direction first"

@ColinKennedy ColinKennedy added the enhancement New feature or enhancement label Dec 2, 2024
@sphamba
Copy link
Owner

sphamba commented Dec 2, 2024

Interesting! We could also have overshooting, or even allow to set a custom function for the path from A to B. I'll keep that in mind

@ColinKennedy
Copy link
Author

True, that'd also be a nice addition too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants