Curve

Curve

A curve that has a time-dependent value (time is always between 0 and 1), and can be translated into GLSL code.

Constructor

new Curve(optionsopt)

Parameters:
Name Type Attributes Description
options object <optional>
Properties
Name Type Attributes Default Description
type string <optional>
timeOffset number <optional>
0

Members

timeOffset :Number

The offset of this curve, when used in a PolyCurve. Needs to be a number between 0 and 1.

type

The value type. Should be 'float', 'vec3' or 'vec4' to indicate which getValueAt method to use.

Methods

(static) numberToGLSL(n) → {string}

Convert a number to GLSL code.

Parameters:
Name Type Description
n number

clone() → {Curve}

getIntegralValueAt(t, lerpValue) → {number}

Parameters:
Name Type Description
t number
lerpValue number

getValueAt(t, lerpValue) → {number}

Get a value at a given point in time

Parameters:
Name Type Description
t number
lerpValue number

getVec4IntegralValueAt(t, lerpValue, store)

Parameters:
Name Type Description
t number
lerpValue number
store Vector4

getVec4ValueAt(t, lerpValue, store)

Get a vec4 value at a given point in time

Parameters:
Name Type Description
t number
lerpValue number
store Vector4

toGLSL() → {string}

Convert the curve into GLSL code.