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

Fixes AnimationGroup isPlaying when mask is applied & played more than once #15862

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

s207152
Copy link
Contributor

@s207152 s207152 commented Nov 20, 2024

A followup fix of #15836 and forum issue:
https://forum.babylonjs.com/t/animationgroup-isplaying-is-always-true-if-animationgroupmask-is-applied/54799

When AnimationGroupMask is applied, isPlaying will set to false on the first time, which works as expected.

However if the animation group is played more than once, isPlaying will still be true after the animation has ended (can be reproduced on the playground provided in the forum issue).

It is due to AnimationGroup._animatables.length being assumed to be 0 when the animation has ended.
So explicitly clear AnimationGroup._animatables should finally fix the issue.

@bjsplat
Copy link
Collaborator

bjsplat commented Nov 20, 2024

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Nov 20, 2024

@bjsplat
Copy link
Collaborator

bjsplat commented Nov 20, 2024

@bjsplat
Copy link
Collaborator

bjsplat commented Nov 20, 2024

@RaananW RaananW requested a review from Popov72 November 20, 2024 19:45
@RaananW RaananW merged commit 52d08ee into BabylonJS:master Nov 21, 2024
12 checks passed
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.

4 participants