Class ColorFilter

java.lang.Object
net.risingworld.api.objects.visuals.ColorFilter

public final class ColorFilter extends Object
Post-processing effect: Color filter applied to the screen. The screen color gets multiplied with this color. Used in conjunction with a PostProcessing object.

Image
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Determines if the effect is set.
    void
    Resets the effect, so it is no longer active (and no longer overrides any game effects).
    void
    set(float r, float g, float b, float a)
    Sets the color of the screen.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ColorFilter

      public ColorFilter()
  • Method Details

    • set

      public void set(float r, float g, float b, float a)
      Sets the color of the screen. Multiplies the screen color with the provided color values. HDR values are supported (i.e RGB values above 1.0). To reset the value to the game default value, call reset()
      Parameters:
      r - the red component. By default 0-1, but also supports values above 1 (HDR). Default value is 1.
      g - the green component. By default 0-1, but also supports values above 1 (HDR). Default value is 1.
      b - the blue component. By default 0-1, but also supports values above 1 (HDR). Default value is 1.
      a - the alpha component (0-1). Default value is 1.
    • reset

      public void reset()
      Resets the effect, so it is no longer active (and no longer overrides any game effects).
    • isOverridden

      public boolean isOverridden()
      Determines if the effect is set.
      Returns:
      true if this effect was set, false if not (or if it was reset).