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

Animations with bezier going over 1 are broken #32

Closed
nnra6864 opened this issue Jan 8, 2025 · 3 comments · Fixed by hyprwm/Hyprland#9000
Closed

Animations with bezier going over 1 are broken #32

nnra6864 opened this issue Jan 8, 2025 · 3 comments · Fixed by hyprwm/Hyprland#9000

Comments

@nnra6864
Copy link

nnra6864 commented Jan 8, 2025

Before I start, I noticed that one of the commits moved all the animation handling to hyprutils and that's why I'm creating the issue here, lmk if I should move it to Hyprland repo.
I sometimes use a bezier curve that goes > 1, such as bezier = overshoot, 0.25, 1.75, 0, 0.9.
I just updated and it seems to be broken.
By broken, I mean the animation goes up to the point where it would reach 1 and abruptly stops.
I am making a wild guess here, but it could be something to do with the fact you are clamping values between 0 and 1 in following places:

return PVALUES ? std::clamp((DURATIONPASSED / 100.f) / PVALUES->internalSpeed, 0.f, 1.f) : 1.f;

const auto SPENT = getPercent();

@vaxerski
Copy link
Member

vaxerski commented Jan 8, 2025

@PaideiaDilemma another thing you broke lol

@PaideiaDilemma
Copy link
Contributor

Thanks. Issue was not the clamping but wrongfully warping based on the Y value of the curve in Hyprland.
Should be fixed in hyprwm/Hyprland#9000

@nnra6864
Copy link
Author

nnra6864 commented Jan 9, 2025

Can confirm that it's working now, thanks for the quick fix!

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

Successfully merging a pull request may close this issue.

3 participants