Min max curve

MinMaxCurve

2024.3.16

yisky

Constructors

  • Creates a MinMaxCurve that generates a constant value.

    Parameters

    • constant: number

    Returns MinMaxCurve

    MinMaxCurve

  • Creates a MinMaxCurve that generates value between a minimum constant and a maximum constant.

    Parameters

    • constantMin: number
    • constantMax: number

    Returns MinMaxCurve

    MinMaxCurve

  • Creates a MinMaxCurve that generates value by a curve.

    Parameters

    Returns MinMaxCurve

    MinMaxCurve

  • Creates a MinMaxCurve that generates value by min and max curve.

    Parameters

    Returns MinMaxCurve

    MinMaxCurve

Properties

constant: number = 0.0

Set the constant value.

MinMaxCurve

constantMax: number = 0.0

Set a constant for the upper bound.

MinMaxCurve

constantMin: number = 0.0

Set a constant for the lower bound.

MinMaxCurve

curve: AnimationCurve = ...

Set the curve

MinMaxCurve

curveMax: AnimationCurve = ...

Set a curve for the upper bound.

MinMaxCurve

curveMin: AnimationCurve = ...

Set a curve for the lower bound.

MinMaxCurve

curveMultiplier: number = 1.0

Set a multiplier to be applied to the curves.

MinMaxCurve

mode: MinMaxCurveMode = MinMaxCurveMode.Constant

Curve mode

MinMaxCurve

Methods

  • Query the value at the specified time.

    Parameters

    • time: number

      Normalized time at which to evaluate the curve, Valid when mode is set to Curve or TwoCurves.

    • OptionalrandomBetween0And1: number = ...

      Lerp factor between two constants or curves, Valid when mode is set to TwoConstants or TwoCurves.

    Returns number

    MinMaxCurve

  • Serialize

    Returns {
        [key: string]: any;
    }

    • [key: string]: any

    MinMaxCurve

  • Deserialize

    Parameters

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

    Returns MinMaxCurve

    MinMaxCurve