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

Animator support transition conditions #2096

Merged
merged 13 commits into from
Jun 21, 2024

Conversation

luzhuang
Copy link
Contributor

@luzhuang luzhuang commented May 14, 2024

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

links: #208

What is the current behavior? (You can also link to an open issue here)

What is the new behavior (if this is a feature change)?

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

Other information:

@GuoLei1990 GuoLei1990 mentioned this pull request May 30, 2024
3 tasks
Copy link
Member

@GuoLei1990 GuoLei1990 left a comment

Choose a reason for hiding this comment

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

Should add unit and e2e test

packages/core/src/animation/AnimatorTransition.ts Outdated Show resolved Hide resolved
packages/core/src/animation/AnimatorTransition.ts Outdated Show resolved Hide resolved
packages/core/src/animation/AnimatorTransition.ts Outdated Show resolved Hide resolved
packages/core/src/animation/AnimatorTransition.ts Outdated Show resolved Hide resolved
packages/core/src/animation/AnimatorTransition.ts Outdated Show resolved Hide resolved
@GuoLei1990 GuoLei1990 changed the base branch from main to dev/1.3 June 19, 2024 08:44
packages/core/src/animation/Animator.ts Outdated Show resolved Hide resolved
packages/core/src/animation/Animator.ts Outdated Show resolved Hide resolved
packages/core/src/animation/Animator.ts Outdated Show resolved Hide resolved
packages/core/src/animation/Animator.ts Outdated Show resolved Hide resolved
packages/core/src/animation/Animator.ts Outdated Show resolved Hide resolved
packages/core/src/animation/Animator.ts Outdated Show resolved Hide resolved
packages/core/src/animation/Animator.ts Outdated Show resolved Hide resolved
packages/core/src/animation/Animator.ts Outdated Show resolved Hide resolved
packages/core/src/animation/Animator.ts Outdated Show resolved Hide resolved
packages/core/src/animation/Animator.ts Outdated Show resolved Hide resolved
for (let j = 0, m = length; j < m; j++) {
const transition = entryTransitions[j];
if (this._checkConditions(null, transition)) {
this.crossFade(transition, i);
Copy link
Member

Choose a reason for hiding this comment

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

crossFade and play is different, i am not sure

if (!targetTransition) {
for (let i = 0, n = anyStateTransitions.length; i < n; ++i) {
const transition = anyStateTransitions[i];
if (this._checkConditions(state, transition)) {
Copy link
Member

Choose a reason for hiding this comment

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

Opt solo mode

@GuoLei1990 GuoLei1990 merged commit 11de431 into galacean:dev/1.3 Jun 21, 2024
6 checks passed
@GuoLei1990 GuoLei1990 added animation Built-in animation system related functions enhancement New feature or request labels Jun 21, 2024
@GuoLei1990 GuoLei1990 changed the title Add transition conditions Animator support transition conditions Jun 21, 2024
@luzhuang luzhuang self-assigned this Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
animation Built-in animation system related functions enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants