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

Refactor MOAIEaseType #879

Open
Vavius opened this issue Apr 7, 2014 · 0 comments
Open

Refactor MOAIEaseType #879

Vavius opened this issue Apr 7, 2014 · 0 comments

Comments

@Vavius
Copy link
Contributor

Vavius commented Apr 7, 2014

Currently, MOAIEaseType is used in two different fashions:

  1. As a true ease type in MOAIEaseDriver and MOAINode's animation helpers - seekAttr, moveAttr, seekLoc, etc (I suppose those are the most used animation routines in MOAI)
  2. As an animcurve key interpolation mode

What I'm suggesting is to split it to two different classes: one for ease drivers, second is for key interpolation:

  1. Ease driver can have more ease types: circ, sine, bounce, back, elastic (those are widely used in js, as3 and other frameworks). Some of them can have parameters, like frequency for elastic, overshoot for back.
  2. Curve key interpolation can have only 3 types: flat, linear, bezier. The last one gives you the control points for left and right tangents. This works best in visual curve editor. So we can keep existing interpolation types, as they are easier to create from code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants