gre / diaporama

image/video/content slideshow engine providing high quality animation effects including Kenburns Effect and GLSL Transitions.

Home Page:http://greweb.me/diaporama/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Avoid coffee inherence usage

gre opened this issue · comments

This task is almost required by tasks #3 and #5 (maybe we could use jQuery plugins architecture instead of coffee extend usages)

writing down notes from my mind...

I need to find a nice way to abstract with some "transitionability" functions.

Design and idea of implementation :

var transitionFunctionsContract = {
  start: function(from, to, duration, ...){},
  end: function(from, to, ...){}
... maybe more
}

which contains an abstraction of different transition system usage.

Each transition system must implements this trait, but these implementation should be keeped static in the Slider core.
We let the possibility for anyone to change the implementation to his own providing a method.

The CSS implementation does nothing,
The Canvas implementation could contains an internal "render" method. It can call requestAnimFrame in start and clean stuff in end.
Other implementation can fit their needs by creating static object in this transitionFunctions object, ...

what's about current method setTransitionFunction, etc ?

maybe i'm going to break retro compatibility with a unique setTransition(o) which set an object o with properties to send to transition functions.