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

feat(ScaleRevealer): finish crossfade early #1125

Merged
merged 3 commits into from
Oct 3, 2024

Conversation

GeopJr
Copy link
Owner

@GeopJr GeopJr commented Sep 22, 2024

fix: #1122 ?

Previously the transition would crossfade between the source widget (attachment) and the target one (mediaviewer) relatively to the transition progress. That creates a seamless transition between them. However as shown on #1122, it also creates an unintended effect around the middle point.

For context, the media viewer's black background's opacity is also relative to the animation.

This PR changes it so as long as the animation progress is over 20%, it won't crossfade. This still looks a bit off, maybe just to me because I've seen it in slow mode.

Another idea would be to make the media viewer's background's opacity get darker sooner so the distorted snapshot of the attachment is not that visible?

whichever the path forward might be, this PR can be optimized further so it's a draft. (we can skip snapshoting the source on over 20% since the fade effect is done).

@GeopJr GeopJr marked this pull request as ready for review October 3, 2024 20:10
@GeopJr
Copy link
Owner Author

GeopJr commented Oct 3, 2024

Made it ease in-out so it hits more progress points, made progress limit 0.3 and optimized snapshoting to skip the whole cross fading process as we only need to snapshot the child

@GeopJr GeopJr merged commit 663f0a2 into main Oct 3, 2024
5 checks passed
@GeopJr GeopJr deleted the feat/scalerevealer/finish-crossfade-early branch October 3, 2024 20:32
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.

[Bug]: Images going fullscreen and back animate to stretched fullscreen rather than to target best fit size
1 participant