Ticket #6671 (assigned enhancement)

Opened 3 months ago

Last modified 3 weeks ago

[patch/cla] Cacheable Animation Framework / API + dojox.fx.WipeLeft Contribution

Reported by: guest Owned by: dante
Priority: normal Milestone: future
Component: General Version: 1.1.0
Severity: normal Keywords:
Cc: ole.ersoy@…, alex

Description

This ticket is related to: http://trac.dojotoolkit.org/ticket/6060

This API has the following goals:

(1) Work just like Dojo's current animation framework

(2) Support caching of animations / dom node switching

(3) Support simple unit testing

(4) Enhance reuse through an animation class hierarchy

(5) Simple animation debugging

(1) I think I implemented all the methods and semantics in dojox.fx.Animation that come with the use of dojo.animateProperty().

onEnd, onBegin, and perFrame template methods have been added that can be implemented by subclasses of dojox.fx.Animation.

These are automatically called by dojox.fx.Animation per the template design pattern.

(2) Caching is supported. Just change the animation instances DOM node reference, and the new reference is animated when calling Animation.play() on the Animation instance.

(3) Unit testing of the animation is supported by isolating each frame inside the Animation.frame() method.

This allows animation developers to test node properties before and after each frame.

(4) If you take a look at dojox.fx.AbsoluteDimension? you'll see that this could easily be reused by dojox.fx.sizeTo...however dojox.fx.sizeTo would have to be reimplemented as dojox.fx.SizeTo?, which would be a subclass of dojox.fx.AbsoluteDimension?.

(5) I personally think this is easier to debug, since each class in the hierarchy provides specific services, implemented on framework methods. I'm naturally biased though :-)

Cheers, - Ole

Attachments

AbsoluteDimension.js (1.5 kB) - added by guest 3 months ago.
Animation.js (4.5 kB) - added by guest 3 months ago.
WipeLeft.js (1.8 kB) - added by guest 3 months ago.
Animation.html (1.8 kB) - added by guest 3 months ago.
WipeRight.js (2.0 kB) - added by guest 3 months ago.

Change History

Changed 3 months ago by guest

Changed 3 months ago by guest

Changed 3 months ago by guest

Changed 3 months ago by guest

Changed 3 months ago by dante

  • owner changed from anonymous to dante
  • status changed from new to assigned
  • summary changed from Cacheable Animation Framework / API + dojox.fx.WipeLeft Contribution to [patch/cla] Cacheable Animation Framework / API + dojox.fx.WipeLeft Contribution

Changed 3 months ago by guest

Oooops - That would be WipeToMyOtherLeft?...WipeRight?

Changed 3 months ago by guest

Changed 3 months ago by guest

Note also that I used to have an Animation.initialize() method, but that was silly, since all initialization should be done in the constructor of Animation subclasses.

Changed 2 months ago by alex

  • cc alex added

Changed 3 weeks ago by dante

  • milestone set to future
Note: See TracTickets for help on using tickets.