Class GLGE.AnimationCurve
A curve which interpolates between control points
Defined in: glge.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Method Attributes | Method Name and Description |
---|---|
addPoint(bezPoint)
Adds a point to the curve
|
|
atX(x, C1, C2, C3, C4)
Get the value of the a single bezier curve
|
|
coord(frame, y)
Get the value of the curve at any point
|
|
getValue(frame)
|
Method Detail
{Number}
addPoint(bezPoint)
Adds a point to the curve
- Parameters:
- {BezPoint} bezPoint
- The bezier point to add
- Returns:
- {Number} Index of the newly added point
{Number}
atX(x, C1, C2, C3, C4)
Get the value of the a single bezier curve
- Parameters:
- {Number} x
- xcoord of point to get
- {Number} C1
- First bezier control point
- {Number} C2
- Second bezier control point
- {Number} C3
- Third bezier control point
- {Number} C4
- Forth bezier control point
- Returns:
- {Number} The value of the curve at the given x
{Number}
coord(frame, y)
Get the value of the curve at any point
- Parameters:
- {Number} frame
- The frame(x-coord) to return the value for
- y
- Returns:
- {Number} The value of the curve at the given point
getValue(frame)
- Parameters:
- frame