asdasdasdasdasd

This commit is contained in:
jane 2021-05-26 11:01:34 -04:00
parent 38cd9cf64d
commit a95e07df96

View file

@ -84,23 +84,23 @@ function fade(index) {
var current_tick_r = Math.abs(Math.floor((diff_cr / diff_r) * 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)); var current_tick_g = Math.abs(Math.floor((diff_cg / diff_g) * fade_ticks));
var current_tick_b = Math.abs(Math.floor((diff_cb / diff_b) * fade_ticks)); var current_tick_b = Math.abs(Math.floor((diff_cb / diff_b) * fade_ticks));
if (diff_r == 0) { if (diff_r == 0 ||
current_tick_r = fade_ticks; Math.abs(current.r + interval_r) >= Math.abs(final.r) ||
} else if (Math.abs(current.r + interval_r) >= Math.abs(final.r)) { current_tick_r + 1 >= fade_ticks) {
current.r = final.r; current.r = final.r;
interval_r = 0; interval_r = 0;
current_tick_r = fade_ticks; current_tick_r = fade_ticks;
} }
if (diff_g == 0) { if (diff_g == 0 ||
current_tick_g = fade_ticks; Math.abs(current.g + interval_g) >= Math.abs(final.g) ||
} else if (Math.abs(current.g + interval_g) >= Math.abs(final.g)) { current_tick_g + 1 >= fade_ticks) {
current.g = final.g; current.g = final.g;
interval_g = 0; interval_g = 0;
current_tick_g = fade_ticks; current_tick_g = fade_ticks;
} }
if (diff_b == 0) { if (diff_b == 0 ||
current_tick_b = fade_ticks; Math.abs(current.b + interval_b) >= Math.abs(final.b) ||
} else if (Math.abs(current.b + interval_b) >= Math.abs(final.b)) { current_tick_b + 1 >= fade_ticks) {
current.b = final.b; current.b = final.b;
interval_b = 0; interval_b = 0;
current_tick_b = fade_ticks; current_tick_b = fade_ticks;