fix negative color effect in objects.js

In JS, foo%360 gives a negative remainder if the dividend is negative.  This one-line change from developer.mozilla.org computes the correct modulo.
I should have called this branch "color" not "ghost", oops.
pull/95/head
brianharvey 2021-04-22 21:55:31 -07:00
rodzic 3ac1e456a5
commit f8fc66247f
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -5113,7 +5113,7 @@ SpriteMorph.prototype.applyGraphicsEffects = function (canvas) {
}
v = max / 255;
h = (h + hueShift * 360 / 200) % 360;
h = (((h + hueShift * 360 / 200) % 360)+360)%360;
s = Math.max(0, Math.min(s + saturationShift / 100, 1));
v = Math.max(0, Math.min(v + brightnessShift / 100, 1));