Welcome, guest ( Login )

WikiHome » FxLite

FxLite

Version 2, changed by owen 12/09/2006.   Show version history

OBSOLETE?

Dan's notes (from private email):

Ok, so for the lite version of animation here're some suggestions.

Remove dependency on Curves in animation.js
In the if() block around line 15 instead of creating a Line object build a
simple object that supports the correct behaviour.  A 2D line should be
fine.  Something like:
curve = {
  sx: curve[0][0],
  sy: curve[0][1],
  ex: curve[1][0],
  ey: curve[1][1],
  getValue: function(n) {
    return [
      ((this.ex - this.sx) * n) + this.sx,
      ((this.ey - this.sy) * n) + this.sy
    ];
  }
}

Also take the default acceleration curve out and build a couple of simpler
2D ones as above, I'll need more time to prepare these, but we should
probably just support cubic ease-in and ease-out.  It wouldn't be as
pronounced as the catmull spline, but still better than no acceleration.
For the time being just use the above object.


Then in fx/html.js:
- Use the array arguments instead of creating a 1D curve for the calls to
animation() in every function (search for .curves and you'll find about 5
references)
- Remove reference to toCoordinateArray() and assume that the arrays are
well formed
- pass start and end color to colorFade and assume that they are RGB arrays
not hex
- If you think it's possible, remove all references to dojo.style but it's
quite extensive so might not be worth it


How's that sound?


Additionally, I (Alex) think that we should be supporting "property-based animation" where a user can express a desire to have one or more CSS properties moved through a range of values over a timeframe. It would seem to encapsulate most of the current use cases for animation into a generic interface.

Comments (1)

bill@dojotoolkit.org said, 04/05/2006

What is this for? To replace dojo.fx, or were we planning to support both dojo.fx and dojo.fxlite?

Attachments (0)

  File By Size Attached Ver.