Class FloatDistribution

Specifies a value as a distribution, which can include a constant value, random range or a curve.

Hierarchy

  • FrameworkObject
    • FloatDistribution

Constructors

  • Creates a new distribution that returns a constant value.

    Parameters

    • Optionaloptions:
          | {
              value: number;
          }
          | {
              maxValue: number;
              minValue: number;
          }
          | {
              curve: AnimationCurve;
          }
          | {
              maxCurve: AnimationCurve;
              minCurve: AnimationCurve;
          }

      Options object for the function call.

    • OptionalisInternalConstructor: boolean

    Returns FloatDistribution

Accessors

Methods

  • Evaluates the value of the distribution.

    Parameters

    • options: {
          factor: number;
          t: number;
      } | {
          factorGenerator: Random;
          t: number;
      }

      Options object for the function call.

    Returns number

    Evaluated value.

  • Returns the maximum value of a constant range. Only defined if the distribution represents a non-curve range.

    Returns number

  • Returns the curve representing the second curve of a curve range. Only defined if the distribution represents a curve range.

    Returns AnimationCurve

  • Returns the constant value of the distribution, or the minimal value of a constant range. Undefined if the distribution is represented by a curve.

    Returns number

  • Returns the curve representing the distribution, or the first curve representing a curve range. Undefined if the distribution is represented by a constant or a non-curve range.

    Returns AnimationCurve