A plugin class which can be used to animate the motion of a node, in response to a flick gesture.
_animx
y
duration
easing
Internal utility method to perform the transition step
_bouncex
max
Internal utility method to constrain the offset value based on the bounce criteria.
_flickFrameExecutes a single frame in the flick animation
_killTimerStop the animation timer
_movex
y
duration
easing
Internal utility method to move the node to a given XY position, using transitions, if specified.
_onFlicke
The flick event listener. Kicks off the flick animation.
e
EventFacade
The flick event facade, containing e.flick.distance, e.flick.velocity etc.
_renderClassesAdds the CSS classes, necessary to set up overflow/position properties on the node and boundingBox.
_roundRounds values
angle2radval
Converts an angle to a radian
val
Objecxt
Value to be converted to radian.
compareTransformSequencelist1
list2
Compares to arrays or transform functions to ensure both contain the same functions in the same order.
decompose3x3
Breaks up a 2d transform matrix into a series of transform operations.
3x3
Array
matrix array
deg2raddeg
Converts a degree value to a radian.
deg
Number
Degree value to be converted to radian.
getDeterminantmatrix
Returns the determinant of a given matrix.
/ \ | matrix[0][0] matrix[1][0] matrix[2][0] | | matrix[0][1] matrix[1][1] matrix[2][1] | | matrix[0][2] matrix[1][2] matrix[2][2] | | matrix[0][3] matrix[1][3] matrix[2][3] | \ /
matrix
Array
An nxn matrix represented an array of vector (column) arrays. Each vector array has index for each row.
getMinorsmatrix
columnIndex
rowIndex
Returns a matrix of minors based on a matrix, column index and row index.
getnxnConverts a transform object to an array of column vectors.
/ \ | matrix[0][0] matrix[1][0] matrix[2][0] | | matrix[0][1] matrix[1][1] matrix[2][1] | | matrix[0][2] matrix[1][2] matrix[2][2] | \ /
getTransformArrayval
Parses a transform string and returns an array of transform arrays.
val
String
A transform string
getTransformFunctionArrayReturns an array of transform arrays representing transform functions and arguments.
initializerconfig
The initializer lifecycle implementation.
config
Object
The user configuration for the plugin
inverseArray
Returns the inverse of a matrix
Array
Object
matrix An array representing an nxn matrix
rad2degrad
Converts a radian value to a degree.
rad
Number
Radian value to be converted.
scalarMultiplymatrix
multiplier
Multiplies a matrix by a numeric value.
setBoundsSets the min/max boundaries for the flick animation, based on the boundingBox dimensions.
signval
Returns the sign of value
val
Number
value to be interpreted
transposematrix
Returns the transpose for an nxn matrix.
matrix
Object
An nxn matrix represented by an array of vector arrays.
_rounderUsed as value for the _rounding method.
EASINGThe default easing to use for the main flick movement transition
Default: 'cubic-bezier(0, 0.1, 0, 1.0)'
NAMEThe NAME of the Flick class. Used to prefix events generated by the plugin.
Default: "pluginFlick"
NSThe namespace for the plugin. This will be the property on the node, which will reference the plugin instance, when it's plugged in.
Default: "flick"
SNAP_EASINGThe default easing to use for the bounce snap-back transition
Default: 'ease-out'
VELOCITY_THRESHOLDThe threshold used to determine when the decelerated velocity of the node is practically 0.
Default: 0.015
bounceDrag coefficient for intertial scrolling at the upper and lower boundaries of the scrollview. Set to 0 to disable "rubber-banding".
Default: 0.7
bounceChange
Fires when the value for the configuration attribute bounce is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
bounceDistanceThe bounce distance in pixels
Default: 150
bounceDistanceChange
Fires when the value for the configuration attribute bounceDistance is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
boundingBoxThe constraining box relative to which the flick animation and bounds should be calculated.
Default: parentNode
boundingBoxChange
Fires when the value for the configuration attribute boundingBox is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
boundingBoxThe constraining box relative to which the flick animation and bounds should be calculated.
Default: parentNode
boundingBoxChange
Fires when the value for the configuration attribute boundingBox is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
decelerationDrag coefficent for inertial scrolling. The closer to 1 this value is, the less friction during scrolling.
Default: 0.98
decelerationChange
Fires when the value for the configuration attribute deceleration is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
durationThe custom duration to apply to the flick animation. By default, the animation duration is controlled by the deceleration factor.
Default: null
durationChange
Fires when the value for the configuration attribute duration is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
easingThe custom transition easing to use for the flick animation. If not provided defaults to internally to Flick.EASING, or Flick.SNAP_EASING based on whether or not we're animating the flick or bounce step.
Default: null
easingChange
Fires when the value for the configuration attribute easing is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
minVelocityThe minimum flick gesture velocity (px/ms) at which to trigger the flick response
Default: 0
minVelocityChange
Fires when the value for the configuration attribute minVelocity is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
minVelocityThe minimum flick gesture distance (px) for which to trigger the flick response
Default: 10
minVelocityChange
Fires when the value for the configuration attribute minVelocity is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade