decrease render rate
This commit is contained in:
parent
501c3af95a
commit
9e1c0f5be1
1 changed files with 4 additions and 4 deletions
|
@ -22,11 +22,11 @@ export function set_pattern(pat) {
|
||||||
|
|
||||||
function tick_pattern() {
|
function tick_pattern() {
|
||||||
// do the parsing stuff here
|
// do the parsing stuff here
|
||||||
var r = Math.floor(Math.random() * 100)
|
|
||||||
var g = Math.floor(Math.random() * 100);
|
|
||||||
var b = Math.floor(Math.random() * 100);
|
|
||||||
|
|
||||||
for (let i = 0; i < cfg.leds; i++) {
|
for (let i = 0; i < cfg.leds; i++) {
|
||||||
|
var r = Math.floor(Math.random() * 100)
|
||||||
|
var g = Math.floor(Math.random() * 100);
|
||||||
|
var b = Math.floor(Math.random() * 100);
|
||||||
next_pattern[i] = ((r << 8) + g) << 8 + b;
|
next_pattern[i] = ((r << 8) + g) << 8 + b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ export function tick() {
|
||||||
tick_pattern();
|
tick_pattern();
|
||||||
}
|
}
|
||||||
ws281x.render(pixels);
|
ws281x.render(pixels);
|
||||||
ws281x.sleep(10);
|
ws281x.sleep(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
function fade(index) {
|
function fade(index) {
|
||||||
|
|
Loading…
Reference in a new issue