A curve set is a collection of curves.

Constructors

Accessors

Methods

Constructors

  • Creates a new CurveSet instance.

    Parameters

    • ...args: any

    Returns CurveSet

    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
    ]
    ]);

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.

    • Optionalresult: 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.