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

Energy interface APIs #33

Closed
12 tasks done
romelperez opened this issue Oct 14, 2019 · 0 comments
Closed
12 tasks done

Energy interface APIs #33

romelperez opened this issue Oct 14, 2019 · 0 comments
Assignees
Labels
complexity: medium package: animator NPM package @arwes/animator type: feature A new feature
Milestone

Comments

@romelperez
Copy link
Member

romelperez commented Oct 14, 2019

To allow animated components to control animations, we need to add the following features:

Props

  • duration.delay: number = 0
    • Energy component should extend its value if defined.
    • AnimationProvider should provide its value if defined.
    • It is the time to delay the Energy flow only before transitioning from exited to entering.
  • merge: boolean = false - If enabled and it is not root, the node will enter in the flow when its parent changes to entering.
  • onActivate: Function(boolean) Get notified when the component is activated or de-activated. It is a function. It provides 1 parameter with the boolean value of activate.

Methods

  • getFlow(): flow - Returns the current node flow state.
  • hasEntered(): boolean - If the node has entered in the system flow at least once.
  • hasExited(): boolean - If the node has exited in the system flow at least once.
  • getDurationIn(): number - Get the duration the node lasts entering,
    including delay.
  • getDurationOut(); number - Get the duration the node lasts exiting.
  • updateDuration(duration: number | Object) - Update the animation duration.

Provider

  • The Energy should provide the methods using an interface object along with the flow object.
  • It should not be a reference to the component itself.

Read Animation System specs.

@romelperez romelperez added package: animator NPM package @arwes/animator complexity: medium type: feature A new feature labels Oct 14, 2019
@romelperez romelperez added this to the v1.0 milestone Oct 14, 2019
@romelperez romelperez self-assigned this Oct 14, 2019
@romelperez romelperez added this to Ready for development in Motion Design Packages Oct 14, 2019
@romelperez romelperez mentioned this issue Oct 15, 2019
10 tasks
@romelperez romelperez moved this from Ready for development to In progress in Motion Design Packages Oct 15, 2019
@romelperez romelperez moved this from In progress to In review in Motion Design Packages Oct 20, 2019
@romelperez romelperez moved this from In review to Done in Motion Design Packages Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity: medium package: animator NPM package @arwes/animator type: feature A new feature
Projects
Development

No branches or pull requests

1 participant