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

A group's opacity animation blinks/flashes the original state once hits 100% or 0% #159

Closed
Frans-L opened this issue Mar 10, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@Frans-L
Copy link

Frans-L commented Mar 10, 2023

Description

Group's opacity animations aren't working correctly if the animations go from 0 to 100. Once it hits 100, it blinks the original state for one frame. The blinking doesn't happen if the animation goes from e.g. 0-99. This also happens if the animation goes from 100 to 0.

This happens at least with iOS devices (iPhone 12, iOS 16) & emulators. I haven't tried with Android. Using the latest Rive version (#149) didn't solve the issue.

The blinking is noticeable especially when trying to create complicated animations with many groups.

Provide a Repro

Minimal reproducible demo: A group whose opacity transition from 0 to 100, while the child of the group is animated to move down.

https://rive.app/community/4584-9302-bug-flas

Video

1 frame blinking happens right after the moving red bar hits opacity level 100. So it happens at the beginning of the video. It's easier to see when playing it at 0.25 playback speed. (Github's video player might skip 1 frame to play it smoothly. I recommend downloading the video offline to see the blinking.)

bug.mp4

Versions

Node: 16
React-Native: 0.70
xCode: 14.2

@Frans-L Frans-L changed the title A group's opacity animation blinks / flashes the original state once hits 100% or 0% A group's opacity animation blinks/flashes the original state once hits 100% or 0% Mar 10, 2023
@Frans-L
Copy link
Author

Frans-L commented May 10, 2023

This seems to happen also with e.g. Google Chrome when watching a preview from rive.app/community. I would guess that affects all platforms from the web to native mobile apps.

I know you @mjtalbot are really busy with all the things. Do you have any rough estimation of when someone could have time to look at this?

@HayesGordon
Copy link
Contributor

Hi @Frans-L thanks for reporting this and apologies for not getting back to you sooner. I'm able to reproduce and we'll investigate.

@caudetgit caudetgit added the bug Something isn't working label May 10, 2023
rive-engineering pushed a commit to rive-app/rive-cpp-legacy that referenced this issue May 11, 2023
When converting floating point opacity values to 8 bit alpha, make sure to not under/overflow 0-255.

Fixes rive-app/rive-react-native#159

Diffs=
e65175b88 Fix flickering caught in high level runtimes. (#5243)
rive-engineering pushed a commit to rive-app/rive-android that referenced this issue May 11, 2023
When converting floating point opacity values to 8 bit alpha, make sure to not under/overflow 0-255.

Fixes rive-app/rive-react-native#159

Diffs=
e65175b88 Fix flickering caught in high level runtimes. (#5243)
rive-engineering pushed a commit to rive-app/rive-sharp that referenced this issue May 11, 2023
When converting floating point opacity values to 8 bit alpha, make sure to not under/overflow 0-255.

Fixes rive-app/rive-react-native#159

Diffs=
e65175b88 Fix flickering caught in high level runtimes. (#5243)
rive-engineering pushed a commit to rive-app/rive-ios that referenced this issue May 11, 2023
When converting floating point opacity values to 8 bit alpha, make sure to not under/overflow 0-255.

Fixes rive-app/rive-react-native#159

Diffs=
e65175b88 Fix flickering caught in high level runtimes. (#5243)
@HayesGordon
Copy link
Contributor

Sorry about this, not yet resolved. We will need to wait for the fix to land on iOS + Android, then we can propagate it down to RN. But the underlying issue in the rendering is solved.

@HayesGordon HayesGordon reopened this May 12, 2023
@zplata
Copy link
Contributor

zplata commented Jun 30, 2023

Sorry for the delay in getting back here, @Frans-L! This should be fixed in v4.1.0 and up.

@Frans-L Frans-L closed this as completed Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants