Aeva / m.grl

Midnight Graphics & Recreation Library
http://mgrl.midnightsisters.org
GNU Lesser General Public License v3.0
44 stars 3 forks source link

allow callback to be scheduled at end of animation #239

Closed wijnen closed 7 years ago

wijnen commented 7 years ago

This pull request allows a callback to be scheduled at the end of an animation. I tested it with a gani, but since it's implemented in m.time.js, it should also work for jta files.

It also fixes some textual errors and adds a newline at the end of the file (because vim does that by default and I think you probably don't care about it).

To use it, the animation should be started like this: node.play('animation-name', function () { alert('done!'); });

Aeva commented 7 years ago

looks fantastic!