Hello. Just wanted to post here something really funny & potential dangerous.
ColorRGBA is not immutable, that means that the static definitions of colors are global and also mutable. I just created a directional light and changed the light color depending on the position of the sun.
I did first color=ColorRGBA.White. Like I would do with Java’s AWT color=Color.WHITE.
Then I changed the color RGB values
color = ColorRGBA.White; // somewhere else color.r = calcRed(position); color.g = calcGreen(position); color.b = calcBlue(position); // later light.setColor(color);
My GUI started to look like this:
I was thinking that the directional light somehow changes the GUI-node.
After some testing it was clear that I have changed the color White globally.
So, yeah, don’t use the ColorRGBA#White etc. definitions.