as
This commit is contained in:
parent
ef6bde0932
commit
d4ddc674cc
1 changed files with 3 additions and 3 deletions
|
@ -97,21 +97,21 @@ function fade(index) {
|
|||
var current_tick_g = Math.floor(Math.abs(diff_cg / diff_g) * fade_ticks);
|
||||
var current_tick_b = Math.floor(Math.abs(diff_cb / diff_b) * fade_ticks);
|
||||
if (diff_r == 0 ||
|
||||
current.r + interval_r >= final.r ||
|
||||
Math.abs(current.r + interval_r) >= Math.abs(final.r) ||
|
||||
current_tick_r + 1 >= fade_ticks) {
|
||||
current.r = final.r;
|
||||
interval_r = 0;
|
||||
current_tick_r = fade_ticks;
|
||||
}
|
||||
if (diff_g == 0 ||
|
||||
current.g + interval_g >= final.g ||
|
||||
Math.abs(current.g + interval_g) >= Math.abs(final.g) ||
|
||||
current_tick_g + 1 >= fade_ticks) {
|
||||
current.g = final.g;
|
||||
interval_g = 0;
|
||||
current_tick_g = fade_ticks;
|
||||
}
|
||||
if (diff_b == 0 ||
|
||||
current.b + interval_b >= final.b ||
|
||||
Math.abs(current.b + interval_b) >= Math.abs(final.b) ||
|
||||
current_tick_b + 1 >= fade_ticks) {
|
||||
current.b = final.b;
|
||||
interval_b = 0;
|
||||
|
|
Loading…
Reference in a new issue