b-g / Ani

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

Callbacks with AniSequence #17

Closed narkai closed 8 years ago

narkai commented 8 years ago

It would be very useful to have callbacks within sequences.

seq.setCallback("myFunction");

This would allow to inject logic inside animations.

Maybe it's already possible but I didn't catch it ?

Thanks for the library 👍

b-g commented 8 years ago

Thanks! I'm afraid but this is not planned ...

However a workaround which should do the trick, is to add a callback to an animation of the sequence. Check e.g.:

https://github.com/b-g/Ani/blob/master/examples/Ani_Sequence_Loop/Ani_Sequence_Loop.pde#L48

Hope that helps! Best, Benedikt