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:
parent
b7afca3ea2
commit
0daccdb2e1
1 changed files with 2 additions and 0 deletions
2
anim.js
2
anim.js
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue