sdasdasdasdasd# Please enter the commit message for your changes. Lines starting
This commit is contained in:
parent
f77f2654c3
commit
0fd0f72523
1 changed files with 6 additions and 6 deletions
12
lights.js
12
lights.js
|
@ -82,12 +82,12 @@ function fade(index) {
|
|||
var diff_cg = current.g - original.g;
|
||||
var diff_b = final.b - original.b;
|
||||
var diff_cb = current.b - original.b;
|
||||
var sign_r = diff_r == Math.abs(diff_r) ? 1 : -1;
|
||||
var sign_g = diff_g == Math.abs(diff_g) ? 1 : -1;
|
||||
var sign_b = diff_b == Math.abs(diff_b) ? 1 : -1;
|
||||
var interval_r = sign_r * Math.ceil(Math.abs(diff_r / fade_ticks));
|
||||
var interval_g = sign_g * Math.ceil(Math.abs(diff_g / fade_ticks));
|
||||
var interval_b = sign_b * Math.ceil(Math.abs(diff_b / fade_ticks));
|
||||
var sign_r = diff_r === Math.abs(diff_r) ? 1 : -1;
|
||||
var sign_g = diff_g === Math.abs(diff_g) ? 1 : -1;
|
||||
var sign_b = diff_b === Math.abs(diff_b) ? 1 : -1;
|
||||
var interval_r = sign_r * Math.ceil(Math.abs(diff_r) / fade_ticks);
|
||||
var interval_g = sign_g * Math.ceil(Math.abs(diff_g) / fade_ticks);
|
||||
var interval_b = sign_b * Math.ceil(Math.abs(diff_b) / fade_ticks);
|
||||
|
||||
var current_tick_r = Math.abs(Math.floor((diff_cr / diff_r) * fade_ticks));
|
||||
var current_tick_g = Math.abs(Math.floor((diff_cg / diff_g) * fade_ticks));
|
||||
|
|
Loading…
Reference in a new issue