Skip to content

Conversation

@islandsvinur
Copy link

Hi Andre,

This fixes the sluggish performance in Safari. By using the timestamp that requestAnimationFrame provides to the callback, we can calculate the progress of the animation. Also tested in Edge, Chrome and Firefox on macOS, which all still behave properly.

I put the rebuild in a separate commit; didn't know if you want to rebuild it yourself for a release.

Fixes #315

@islandsvinur
Copy link
Author

islandsvinur commented Mar 4, 2024

I just realised, for starting/target opacities < 1 the animation time will be shorter than fadeSpeed. With a fadeSpeed: 300 and a target or starting opacity of 0.5, the animation will now take 150 ms. Because the setting is called fade speed, it suggests a certain step size instead of the duration of the animation.

I will fix the code to keep the current behavior.

@Mtillmann
Copy link
Collaborator

@islandsvinur thanks for your dedication! Great work 🙏

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 this pull request may close these issues.

sluggish performance in Safari

2 participants