Interface SkyLayer


public interface SkyLayer
Runtime control over one layer of a skybox, on top of its definition. Found by name with Skybox.layer(String); the handle stays valid across resource reloads, and a name the definition lacks is simply never drawn.

Durations are in ticks of real time (20 per second). Only use a layer from the render thread.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    The opacity multiplier set or animated here, 1 unless changed.
    animateAlpha(float target, int ticks, Easing easing)
    Moves the opacity multiplier to target over ticks.
    animateParam(int index, int ticks, Easing easing, float... target)
    Moves SkyParams[index] to target over ticks.
    animateTint(int argb, int ticks, Easing easing)
    Moves the tint to a packed ARGB color over ticks.
    bindParam(int index, SkyLayer.ParamBinding binding)
    Computes SkyParams[index] every frame, overriding set and animated values until resetParams().
    default SkyLayer
    fadeIn(int ticks)
     
    default SkyLayer
    fadeOut(int ticks)
     
    boolean
     
     
    float[]
    param(int index)
    The current value of SkyParams[index], as 4 floats.
    Goes back to the definition's params, dropping bindings and animations.
    Goes back to the definition's tint.
    setAlpha(float alpha)
    Multiplies the layer's opacity, clamped to [0, 1].
    setParam(int index, float... values)
    Sets SkyParams[index] (0 to 3); missing components are 0.
    default SkyLayer
    setParamColor(int index, int argb)
    Sets SkyParams[index] to a packed ARGB color, as RGBA.
    setTint(int argb)
    Replaces the definition's tint with a packed ARGB color, its alpha the base opacity.
    setVisible(boolean visible)
    Shows or hides the layer at once.
  • Method Details

    • name

      String name()
    • setVisible

      SkyLayer setVisible(boolean visible)
      Shows or hides the layer at once. Layers start visible.
    • isVisible

      boolean isVisible()
    • setAlpha

      SkyLayer setAlpha(float alpha)
      Multiplies the layer's opacity, clamped to [0, 1]. Stops any opacity animation.
    • animateAlpha

      SkyLayer animateAlpha(float target, int ticks, Easing easing)
      Moves the opacity multiplier to target over ticks.
    • fadeIn

      default SkyLayer fadeIn(int ticks)
    • fadeOut

      default SkyLayer fadeOut(int ticks)
    • alpha

      float alpha()
      The opacity multiplier set or animated here, 1 unless changed.
    • setTint

      SkyLayer setTint(int argb)
      Replaces the definition's tint with a packed ARGB color, its alpha the base opacity. Stops any tint animation.
    • animateTint

      SkyLayer animateTint(int argb, int ticks, Easing easing)
      Moves the tint to a packed ARGB color over ticks.
    • resetTint

      SkyLayer resetTint()
      Goes back to the definition's tint.
    • setParam

      SkyLayer setParam(int index, float... values)
      Sets SkyParams[index] (0 to 3); missing components are 0. Stops any animation of it.
    • setParamColor

      default SkyLayer setParamColor(int index, int argb)
      Sets SkyParams[index] to a packed ARGB color, as RGBA.
    • animateParam

      SkyLayer animateParam(int index, int ticks, Easing easing, float... target)
      Moves SkyParams[index] to target over ticks.
    • bindParam

      SkyLayer bindParam(int index, SkyLayer.ParamBinding binding)
      Computes SkyParams[index] every frame, overriding set and animated values until resetParams().
    • resetParams

      SkyLayer resetParams()
      Goes back to the definition's params, dropping bindings and animations.
    • param

      float[] param(int index)
      The current value of SkyParams[index], as 4 floats.