Class LightingUtils

java.lang.Object
com.csse3200.game.lighting.LightingUtils

public class LightingUtils extends Object
Some helpful utils to work with colors and lighting.
  • 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.