Package com.csse3200.game.lighting
Class LightingUtils
java.lang.Object
com.csse3200.game.lighting.LightingUtils
Some helpful utils to work with colors and lighting.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.badlogic.gdx.graphics.Color
interpolateColorCycle
(com.badlogic.gdx.graphics.Color[] colors, float x) Interpolate a colour from a wheel of colours.
-
Constructor Details
-
LightingUtils
public LightingUtils()
-
-
Method Details
-
interpolateColorCycle
public static com.badlogic.gdx.graphics.Color interpolateColorCycle(com.badlogic.gdx.graphics.Color[] colors, float x) Interpolate a colour from a wheel of colours. The colours are equally spaced around the wheel starting at x = 0.0 and wrapping back around at x = 1.0- Parameters:
colors
- Array of colors on the wheel.x
- Position on color wheel.- Returns:
- Interpolated color.
-