fix tick NaN
This commit is contained in:
parent
82b6d6920c
commit
a253589544
1 changed files with 3 additions and 0 deletions
|
@ -77,6 +77,9 @@ function fade(index) {
|
|||
|
||||
var current_tick = Math.floor((diff_cr / diff_r) * fade_ticks);
|
||||
|
||||
if (diff_r == 0 || diff_cr == 0) {
|
||||
current_tick = fade_ticks;
|
||||
}
|
||||
// console.log(`original: ${original.r} ${original.g} ${original.b}\n` +
|
||||
// `current: ${current.r} ${current.g} ${current.b}\n` +
|
||||
// `final: ${final.r} ${final.g} ${final.b}\n` +
|
||||
|
|
Loading…
Reference in a new issue