mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-08-08 05:06:55 +02:00
change color swapping to be more concise
This commit is contained in:
parent
8a0dd55275
commit
873a9aa39e
1 changed files with 5 additions and 9 deletions
|
@ -79,15 +79,11 @@
|
||||||
} else {
|
} else {
|
||||||
// after tween completion reset to zero and flip values to ping pong
|
// after tween completion reset to zero and flip values to ping pong
|
||||||
tweenPosition = 0;
|
tweenPosition = 0;
|
||||||
var buf = startColor.red;
|
for (var color in startColor) {
|
||||||
startColor.red = endColor.red;
|
var storedColor = startColor[color];
|
||||||
endColor.red = buf;
|
startColor[color] = endColor[color];
|
||||||
buf = startColor.green;
|
endColor[color] = storedColor;
|
||||||
startColor.green = endColor.green;
|
}
|
||||||
endColor.green = buf;
|
|
||||||
buf = startColor.blue;
|
|
||||||
startColor.blue = endColor.blue;
|
|
||||||
endColor.blue = buf;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// update position based on LERP_AMOUNT
|
// update position based on LERP_AMOUNT
|
||||||
|
|
Loading…
Reference in a new issue