I downloaded your library and tried the example sketch. It took me a while to get my head round what was happening because of the lack of documentation but I got there in the end.
So the basic idea is that an animator changes a value from astart value to an end value over the given duration of time (milliseconds I think) The different animators use diferent equations for the value versus time curve. The value returned by the animator can be used in any way the user wants. Am I right?
In your blog you state:
I plan implement chaining of animators, callback-handlers, repeat suppor, many more animation types and - ahem - more detailed documentation
Please start with the documentation - I know it is a pain in the neck but if you expect people to use your library then user documentation and documented examples are essential.
Some ideas and suggestions.
- Add another start method that has a single parameter to represent a delayed start e.g. ar.start(1200) - start the animation in 1200 milliseconds time.
- Chaining of animators is interesting since the 'end value' for the second animator should be the 'start value' for the second animator to avoid discontinuiyties in the animation.
- You might want to consider whether you want to be able change the animator used before the first animator has finished. In this case the 'start value' for the new animator should be the 'current value'
- For a truely flexible animation system you might consider simulating your own 'animation event queue' where you create 'events' to triger animation starts, ends, changes etc. So starting an animator would be an event, then when the end value is reached it generates another event which can be used create other start events etc.
The possibbilities are endless but you have made a good start
A final comment - I would have been interested in seeing the source code.