A curve set is a collection of curves.

Constructors

Properties

Accessors

Methods

Constructors

  • Creates a new CurveSet instance.

    Parameters

    • Rest ...args: any

    Returns CurveSet

    Example

    const curveSet = new pc.CurveSet([
    [
    0, 0, // At 0 time, value of 0
    0.33, 2, // At 0.33 time, value of 2
    0.66, 2.6, // At 0.66 time, value of 2.6
    1, 3 // At 1 time, value of 3
    ],
    [
    0, 34,
    0.33, 35,
    0.66, 36,
    1, 37
    ]
    ]);

Properties

_type: number = CURVE_SMOOTHSTEP

Accessors

Methods

  • Returns the interpolated value of all curves in the curve set at the specified time.

    Parameters

    • time: number

      The time at which to calculate the value.

    • Optional result: number[] = []

      The interpolated curve values at the specified time. If this parameter is not supplied, the function allocates a new array internally to return the result.

    Returns number[]

    The interpolated curve values at the specified time.