Revert "Allow anyState transitions to interrupt crossFade & fix transition bugs"#2891
Revert "Allow anyState transitions to interrupt crossFade & fix transition bugs"#2891GuoLei1990 wants to merge 1 commit intodev/2.0from
Conversation
…Fade & f…" This reverts commit 5e5c616.
🤖 Augment PR SummarySummary: This PR reverts the animation state-machine changes introduced in #2885, restoring the previous transition/cross-fade behavior. Changes:
Technical Notes: Net effect is a behavioral rollback: AnyState transitions no longer preempt cross-fades, and transition ordering/selection logic returns to the earlier implementation assumptions. 🤖 Was this summary useful? React with 👍 or 👎 |
| excludeDestState?: AnimatorState | ||
| ): AnimatorStateTransition { | ||
| for (let i = 0, n = transitionCollection.noExitTimeCount; i < n; ++i) { | ||
| for (let i = 0, n = transitionCollection.count; i < n; ++i) { |
There was a problem hiding this comment.
_checkNoExitTimeTransition() now iterates over transitionCollection.count (all transitions) even though it’s only called when noExitTimeCount > 0. This can allow hasExitTime transitions to be applied immediately (bypassing exit-time gating) if their conditions pass after the no-exit-time transitions fail.
Severity: high
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| let index = count; | ||
| // Stop at noExitTimeCount boundary to avoid comparing with noExitTime transitions | ||
| while (--index >= noExitTimeCount && exitTime < transitions[index].exitTime); | ||
| while (--index >= 0 && exitTime < transitions[index].exitTime); |
There was a problem hiding this comment.
The insertion loop for hasExitTime transitions now compares against the entire transitions array, including hasExitTime=false transitions whose exitTime still defaults to 1.0. That can insert exit-time transitions into the [0, noExitTimeCount) segment and break the noExitTimeCount ordering invariant relied on by the forward/backward exit-time scans.
Severity: high
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev/2.0 #2891 +/- ##
===========================================
- Coverage 83.03% 83.02% -0.02%
===========================================
Files 796 796
Lines 90449 90398 -51
Branches 9503 9492 -11
===========================================
- Hits 75107 75054 -53
- Misses 15260 15262 +2
Partials 82 82
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Reverts #2885