Namespace: Interpolation

SQR.Interpolation

A collection of interpolation functions.

Source:

Methods

(static) bezierPosition(t, p0, c0, c1, p1)

Returns the position on a curve for a position (per axis)

Parameters:
Name Type Description
t Number

interpolation value [0-1]

p0 Number

start position

c0 Number

first control point

c1 Number

second control point

p1 Number

end position

Source:

(static) bezierVelocity(t, p0, c0, c1, p1)

Returns the velocity on the curve for a position (per axis)

Parameters:
Name Type Description
t Number

interpolation value [0-1]

p0 Number

start position

c0 Number

first control point

c1 Number

second control point

p1 Number

end position

Source:

(static) linear(e0, e1, t)

Linear interpolation a between two values

Parameters:
Name Type Description
e0 Number

start value

e1 Number

end value

t Number

interpolation value [0-1]

Source:

(static) quadIn(t)

Quadratic ease in based on Penner equations

Parameters:
Name Type Description
t Number

interpolation value [0-1]

Source:

(static) quadInOut(t)

Quadratic ease in-out based on Penner equations

Parameters:
Name Type Description
t Number

interpolation value [0-1]

Source:

(static) quadOut(t)

Quadratic ease out based on Penner equations

Parameters:
Name Type Description
t Number

interpolation value [0-1]

Source:

(static) smoothStep(t)

Smoothstep interpolation a between two values

Parameters:
Name Type Description
t Number

interpolation value [0-1]

Source: