mirror of
https://github.com/overte-org/overte.git
synced 2025-04-10 12:32:50 +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 {
|
||||
// after tween completion reset to zero and flip values to ping pong
|
||||
tweenPosition = 0;
|
||||
var buf = startColor.red;
|
||||
startColor.red = endColor.red;
|
||||
endColor.red = buf;
|
||||
buf = startColor.green;
|
||||
startColor.green = endColor.green;
|
||||
endColor.green = buf;
|
||||
buf = startColor.blue;
|
||||
startColor.blue = endColor.blue;
|
||||
endColor.blue = buf;
|
||||
for (var color in startColor) {
|
||||
var storedColor = startColor[color];
|
||||
startColor[color] = endColor[color];
|
||||
endColor[color] = storedColor;
|
||||
}
|
||||
}
|
||||
|
||||
// update position based on LERP_AMOUNT
|
||||
|
|
Loading…
Reference in a new issue