Min max gradient

MinMaxGradient

2024.3.18

yisky

Constructors

  • Creates a MinMaxGradient that generates a constant color.

    Parameters

    Returns MinMaxGradient

    MinMaxGradient

  • Creates a MinMaxGradient that generates color between a minimum constant color and a maximum constant color.

    Parameters

    Returns MinMaxGradient

    MinMaxGradient

  • Creates a MinMaxGradient that generates a color from a gradient.

    Parameters

    Returns MinMaxGradient

    MinMaxGradient

  • Creates a MinMaxGradient that generates a color from a minimum gradient and a maximum gradient.

    Parameters

    Returns MinMaxGradient

    MinMaxGradient

Properties

color: Color4 = ...

Set a constant color

MinMaxGradient

colorMax: Color4 = ...

Set a constant color for the upper bound.

MinMaxGradient

colorMin: Color4 = ...

Set a constant color for the lower bound.

MinMaxGradient

gradient: Gradient = ...

Set the gradient.

MinMaxGradient

gradientMax: Gradient = ...

Set a gradient for the upper bound.

MinMaxGradient

gradientMin: Gradient = ...

Set a gradient for the lower bound.

MinMaxGradient

mode: MinMaxGradientMode = MinMaxGradientMode.Color

Set the mode that the min-max gradient will use to evaluate colors.

MinMaxGradient

Methods

  • Query the color at the specified time.

    Parameters

    • time: number

      Normalized time at which to evaluate the gradient, Valid when mode is set to Gradient or TwoGradients.

    • OptionalrandomBetween0And1: number = ...

      Lerp factor between two constants or gradients, Valid when mode is set to TwoColorsTwoGradients, 'RandomColor'.

    Returns Color4

    MinMaxGradient

  • Serialize

    Returns {
        [key: string]: any;
    }

    • [key: string]: any

    MinMaxGradient

  • Deserialize

    Parameters

    • json: {
          [key: string]: any;
      }
      • [key: string]: any

    Returns MinMaxGradient

    MinMaxGradient