use shifthue

This commit is contained in:
yugecin 2016-09-30 09:12:54 +02:00
parent e126edbff7
commit 0c16802523
3 changed files with 5 additions and 4 deletions

View File

@ -577,7 +577,6 @@ public class Utils {
return y < Options.height / 2d ? 1 : 4;
}
/*
public static Color shiftHue(Color color, double H) {
double U = Math.cos(H * Math.PI / 180d);
double W = Math.sin(H * Math.PI / 180d);
@ -587,7 +586,7 @@ public class Utils {
n.g = (float) ((0.299 + 0.299 * U - 0.328 * W) * color.r + (0.587d - 0.413 * U + 0.035 * W) * color.g + (0.114d - 0.114d * U - 0.292 * W) * color.b);
n.b = (float) ((0.299d + 0.300d * U + 1.250d * W) * color.r + (0.587d - 0.585d * U + 1.050d * W) * color.g + (0.114 - 0.886 * U - 0.203 * W) * color.b);
return n;
}*/
}
public static Color nextColor() {
Circle.hue += 10;

View File

@ -97,7 +97,8 @@ public class Circle extends GameObject {
public void draw(Graphics g, int trackPosition, boolean mirror) {
Color orig = color;
if (mirror) {
color = Utils.currentShiftColor();
//color = Utils.currentShiftColor();
color = Utils.shiftHue(color, 180f);
}
int timeDiff = hitObject.getTime() - trackPosition;

View File

@ -184,7 +184,8 @@ public class Slider extends GameObject {
public void draw(Graphics g, int trackPosition, boolean mirror) {
Color orig = color;
if (mirror) {
color = Utils.currentShiftColor();
//color = Utils.currentShiftColor();
color = Utils.shiftHue(color, 180f);
}
int timeDiff = hitObject.getTime() - trackPosition;