b-g / Ani

A lightweight animation library for the programming environment Processing
79 stars 13 forks source link

Added CallbackObject property for callbacks on objects other than its own #5

Closed ZeroMax-dev closed 10 years ago

ZeroMax-dev commented 11 years ago

I was using your library in a project and noticed the necessity for Ani objects to be able to invoke callback methods on objects other than their own. That way, an Ani can notify other objects e.g. of its end. It improves the usability of the library in more complex projects greatly.

I also created new Ani.to and Ani.from signatures that include the CallbackObject as a parameter. In case the parameter combinations don't fit for every need, there are of course also getter and setter methods.

b-g commented 11 years ago

hi there, that's great! many thanks! :) could you add a simple example which showcases the new functionality? best, benedikt

ZeroMax-dev commented 11 years ago

Sure, I hope the example is understandable and expressive enough. :)