Methods
-
<static> bypass() → {function}
-
Returns an identity matrix function.
- Since:
-
- 2.0.0
Returns:
This function is passed a current progression argument and returns a matrix for that progression point.
- Type
- function
Example
new caph.animation.Timeline().add({ transition: caph.animation.transition.bypass() }); -
<static> fadeInOutIn(min, max) → {function}
-
Returns a fade-in-out-in opacity transition function.
Parameters:
Name Type Description minNumber A minimum value of opacity.
maxNumber An maximum value of opacity.
- Since:
-
- 2.0.0
Returns:
This function is passed a current progression argument and returns an opacity for that progression point.
- Type
- function
Example
new caph.animation.Timeline().add({ opacity: caph.animation.transition.fadeInOutIn(0, 1) }); -
<static> fadeOutInOut(min, max) → {function}
-
Returns a fade-out-in-out opacity transition function.
Parameters:
Name Type Description minNumber A minimum value of opacity.
maxNumber An maximum value of opacity.
- Since:
-
- 2.0.0
Returns:
This function is passed a current progression argument and returns an opacity for that progression point.
- Type
- function
Example
new caph.animation.Timeline().add({ opacity: caph.animation.transition.fadeOutInOut(0, 1) }); -
<static> flicker(o1, o2) → {function}
-
Returns a flicker opacity transition function.
Parameters:
Name Type Description o1Number A start value of opacity.
o2Number An end value of opacity.
- Since:
-
- 2.0.0
Returns:
This function is passed a current progression argument and returns an opacity for that progression point.
- Type
- function
Example
new caph.animation.Timeline().add({ opacity: caph.animation.transition.flicker(0, 1) }); -
<static> move(x, y, z) → {function}
-
Returns a translation matrix function.
Parameters:
Name Type Description xNumber A x-coordinate.
yNumber A y-coordinate.
zNumber A z-coordinate.
- Since:
-
- 2.0.0
Returns:
This function is passed a current progression argument and returns a matrix for that progression point.
- Type
- function
Example
new caph.animation.Timeline().add({ transition: caph.animation.transition.move(100, 0, 0) }); -
<static> moveCubicBezier(x1, y1, z1, x2, y2, z2, x3, y3, z3) → {function}
-
Returns a cubic-bezier translation matrix function.
Parameters:
Name Type Description x1Number A x-coordinate value of point 1.
y1Number A y-coordinate value of point 1.
z1Number A z-coordinate value of point 1.
x2Number A x-coordinate value of point 2.
y2Number A y-coordinate value of point 2.
z2Number A z-coordinate value of point 2.
x3Number A x-coordinate value of point 3.
y3Number A y-coordinate value of point 3.
z3Number A z-coordinate value of point 3.
- Since:
-
- 2.0.0
Returns:
This function is passed a current progression argument and returns a matrix for that progression point.
- Type
- function
Example
new caph.animation.Timeline().add({ transition: caph.animation.transition.moveCubicBezier(100, 200, 0, 200, 100, 0, 200, 200, 0) }); -
<static> opacity(from, to) → {function}
-
Returns an opacity transition function.
Parameters:
Name Type Description fromNumber A start value of opacity.
toNumber An end value of opacity.
- Since:
-
- 2.0.0
Returns:
This function is passed a current progression argument and returns an opacity for that progression point.
- Type
- function
Example
new caph.animation.Timeline().add({ opacity: caph.animation.transition.opacity(1, 0) }); -
<static> rotateAxis(x, y, z, degree) → {function}
-
Returns an axis rotation matrix function.
Parameters:
Name Type Description xNumber A value of x-axis.
yNumber A value of y-axis.
zNumber A value of z-axis.
degreeNumber A degree to rotate.
- Since:
-
- 2.0.0
Returns:
This function is passed a current progression argument and returns a matrix for that progression point.
- Type
- function
Example
new caph.animation.Timeline().add({ transition: caph.animation.transition.rotateAxis(1, 1, 0, 45) }); -
<static> rotateX(degX) → {function}
-
Returns a x-axis rotation matrix function.
Parameters:
Name Type Description degXNumber A degree of x-axis.
- Since:
-
- 2.0.0
Returns:
This function is passed a current progression argument and returns a matrix for that progression point.
- Type
- function
Example
new caph.animation.Timeline().add({ transition: caph.animation.transition.rotateX(45) }); -
<static> rotateXYZ(degX, degY, degZ) → {function}
-
Returns a rotation matrix function.
Parameters:
Name Type Description degXNumber A degree of x-axis.
degYNumber A degree of y-axis.
degZNumber A degree of z-axis.
- Since:
-
- 2.0.0
Returns:
This function is passed a current progression argument and returns a matrix for that progression point.
- Type
- function
Example
new caph.animation.Timeline().add({ transition: caph.animation.transition.rotateXYZ(90, 0, 0) }); -
<static> rotateY(degY) → {function}
-
Returns a y-axis rotation matrix function.
Parameters:
Name Type Description degYNumber A degree of y-axis.
- Since:
-
- 2.0.0
Returns:
This function is passed a current progression argument and returns a matrix for that progression point.
- Type
- function
Example
new caph.animation.Timeline().add({ transition: caph.animation.transition.rotateY(45) }); -
<static> rotateZ(degZ) → {function}
-
Returns a z-axis rotation matrix function.
Parameters:
Name Type Description degZNumber A degree of z-axis.
- Since:
-
- 2.0.0
Returns:
This function is passed a current progression argument and returns a matrix for that progression point.
- Type
- function
Example
new caph.animation.Timeline().add({ transition: caph.animation.transition.rotateZ(45) }); -
<static> scale(x, y, z) → {function}
-
Returns a scale matrix function.
Parameters:
Name Type Description xNumber A value of x scale.
yNumber A value of y scale.
zNumber A value of z scale.
- Since:
-
- 2.0.0
Returns:
This function is passed a current progression argument and returns a matrix for that progression point.
- Type
- function
Example
new caph.animation.Timeline().add({ transition: caph.animation.transition.scale(2, 2, 0) }); -
<static> skewXY(degX, degY) → {function}
-
Returns a skew matrix function along the X and Y axis.
Parameters:
Name Type Description degXNumber A degree of x-axis.
degYNumber A degree of y-axis.
Returns:
This function is passed a current progression argument and returns a matrix for that progression point.
- Type
- function
Example
new caph.animation.Timeline().add({ transition: caph.animation.transition.skewXY(30, 0) });