Add return value to run method

Currently the `run` method has no return value.

It would be helpful if the method would return a reference
to the animation itselves, so that code like this would
be possible:

````javascript
let foo = new DMX.Animation()
   .add(...)
   .run(...);
````
This commit is contained in:
Manuel Ernst 2018-11-09 14:00:00 +01:00 committed by seriousManual
parent b7afca3ea2
commit 0daccdb2e1

View file

@ -65,6 +65,8 @@ Anim.prototype.run = function(universe, onFinish) {
ani_setup()
var iid = this.interval = setInterval(ani_step, resolution)
return this
}
module.exports = Anim