PolyCurve

PolyCurve

A collection of Curve instances. Used to connect different types curves, joining them at their given time offsets.

Constructor

new PolyCurve(optionsopt)

Parameters:
Name Type Attributes Description
options object <optional>
Properties
Name Type Attributes Description
segments Array.<Curve> <optional>

Members

segments :Array.<Curve>

Methods

addSegment(curve)

Parameters:
Name Type Description
curve Curve

getIntegralValueAt(t, lerpValue) → {number}

Get the integral value of the curve at a given time.

Parameters:
Name Type Description
t number
lerpValue number

getValueAt(t, lerpValue) → {number}

Get the value of the curve at a given time.

Parameters:
Name Type Description
t number
lerpValue number

integralToGLSL(timeVariableName, lerpValueVariableName)

Returns a GLSL expression that gives the integral value of the curve at a given time.

Parameters:
Name Type Description
timeVariableName string
lerpValueVariableName string

removeSegment(i)

Parameters:
Name Type Description
i number

sort()

Sorts the segments depending on their timeOffset.

toGLSL(timeVariableName, lerpValueVariableName)

Returns a GLSL expression that gives the value of the curve at a given time.

Parameters:
Name Type Description
timeVariableName string
lerpValueVariableName string