Vec2Gradient

Gradient for two-dimensional vectors.

Constructor

new Vec2Gradient(values, smooth)

Create a new Vec2 gradient.
Parameters:
NameTypeDefaultDescription
valuesObject.<number, (number|Vec2)>Values at time intervals
smoothbooleanfalseWhether the track should start and end smoothly/gradually

Methods

get(progress) → {Vec2}

Get the vector a specified point.
Parameters:
NameTypeDescription
progressnumberOverall animation progress (0 - 1)
Returns:
Vector at current point
Type: 
Vec2