diff --git a/lights.js b/lights.js index 5902e62..644862c 100644 --- a/lights.js +++ b/lights.js @@ -9,7 +9,6 @@ const log = new Logger( ); const fade_ticks = cfg.fade_ticks || 20; -var num_ticks = 0; var pixels = new Uint32Array(cfg.leds); var pixel_cache = new Uint32Array(cfg.leds); var next_pattern = new Uint32Array(cfg.leds); @@ -114,25 +113,15 @@ export const functions = { convert_args: true, } ), - stagger: new Function( + slide: new Function( (index, arg1, arg2) => { - return (index + arg2) % 255; + return index + arg2; }, { requires_arg1: true, requires_arg2: true, convert_args: true, - }, - slide: new Function( - (index, arg1, arg2) => { - return (num_ticks + arg2) % 255; - }, - { - requires_arg1: true, - requires_arg2: true, - convert_args: true - } - ) + } ), }; @@ -182,7 +171,6 @@ function tick_pattern() { } else { getRandom(); } - num_ticks++; } function getRandom() {