tuning
This commit is contained in:
parent
d80e08f2c9
commit
633c125d51
3 changed files with 20 additions and 3 deletions
3
anim.js
3
anim.js
|
@ -1,11 +1,12 @@
|
|||
var ease = require('./easing.js').ease
|
||||
var resolution = 30;
|
||||
var resolution = 25;
|
||||
|
||||
exports.Anim = function(universe) {
|
||||
this.universe = universe;
|
||||
this.fx_stack = [];
|
||||
this.add = function(to, duration, options) {
|
||||
var options = options || {};
|
||||
var duration = duration || resolution;
|
||||
options['easing'] = options['easing'] || 'linear';
|
||||
this.fx_stack.push({'to': to, 'duration': duration, 'options': options});
|
||||
return this;
|
||||
|
|
16
dmx.js
16
dmx.js
|
@ -17,4 +17,20 @@ var x = new A(universe)
|
|||
.add({1: 255}, 200)
|
||||
.add({1: 0}, 100)
|
||||
.add({1: 255}, 100)
|
||||
.add({1: 0})
|
||||
.delay(50)
|
||||
.add({1: 255})
|
||||
.delay(50)
|
||||
.add({1: 0})
|
||||
.delay(50)
|
||||
.add({1: 255})
|
||||
.delay(50)
|
||||
.add({1: 0})
|
||||
.delay(50)
|
||||
.add({1: 255})
|
||||
.delay(50)
|
||||
.add({1: 0})
|
||||
.run(done);
|
||||
var y = new A(universe)
|
||||
.add({9: 255}, 10000)
|
||||
.run(done);
|
|
@ -49,7 +49,7 @@ exports.init = function(dev_id) {
|
|||
|
||||
setInterval(function() {
|
||||
send_universe(dev, universe);
|
||||
}, 30);
|
||||
}, 25);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue