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

Add transition conditions #2096

Open
wants to merge 7 commits into
base: dev/1.3
Choose a base branch
from

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, ...)

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

@@ -0,0 +1,11 @@
export type AnimatorControllerParameterValue = number | string | boolean;
Copy link
Member

Choose a reason for hiding this comment

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

Don't need

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the types of values need to be limited

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
addCondition(
mode: AnimatorConditionMode,
parameter: string,
threshold?: AnimatorControllerParameterValue
Copy link
Member

Choose a reason for hiding this comment

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

  • Why threshold can be undefined
  • The order should same with AnimatorCondition constructor

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because AnimatorConditionMode may be IF means the parameter is true, AnimatorCondition will add '?'

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
@@ -1,8 +1,17 @@
/**
* The mode of the condition.
Copy link
Member

Choose a reason for hiding this comment

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

The mode of the animator condition.

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.

None yet

2 participants