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

fix: re-evaluate isRenderable on alpha change #390

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

wouterlucas
Copy link
Contributor

On low powered devices / heavy operation UI's there might be a race condition where the animation/transition is ends prior to the update loop finishing its first run. This causes the isRenderable to not be evaluated in time for the alpha changes to take affect.

This PR ensures isRenderable is always re-evaluated on an alpha change and moves the worldAlpha calculation slightly up to ensure it gets handled in the correct order if its a 1 shot update.

Also save a little processing by ensuring on alpha change the children only re-evaluate the worldAlpha and not a global, reducing child update processing.

Fixes #388
Might fix #372 - though cant reproduce to validate on my setup (even with 20x slowdown).

Copy link
Contributor

@erikhaandrikman erikhaandrikman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@erikhaandrikman erikhaandrikman added this pull request to the merge queue Sep 23, 2024
Merged via the queue into main with commit 8acd788 Sep 23, 2024
2 checks passed
@Drulokia
Copy link
Collaborator

This indeed seems to fix the issue in #372

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.

Textures being freed? Nodes with alpha = 0 can't have their src changed
3 participants