-
add
(element(s), params, options)Ease | Array.<Ease>
-
add ease(s) to one or more elements
Name |
Type |
Description |
element(s) |
HTMLElement
|
Array.<HTMLElement>
|
|
params |
object
|
Name |
Type |
Description |
left |
number
|
optional
in px |
top |
number
|
optional
in px |
width |
number
|
optional
in px |
height |
number
|
optional
in px |
scale |
number
|
optional
|
scaleX |
number
|
optional
|
scaleY |
number
|
optional
|
opacity |
number
|
optional
|
marginTop |
number
|
optional
in px |
marginRight |
number
|
optional
in px |
marginBottom |
number
|
optional
in px |
marginLeft |
number
|
optional
in px |
color |
color
|
Array.<color>
|
optional
|
backgroundColor |
color
|
Array.<color>
|
optional
|
|
options |
object
|
optional
Name |
Type |
Description |
duration |
number
|
optional
|
ease |
string
|
function
|
optional
|
repeat |
boolean
|
number
|
optional
|
reverse |
boolean
|
optional
|
|
Returns:
Type |
Description |
Ease
|
Array.<Ease>
|
ease(s) for each element |
-
emit
(event)Boolean
inherited
-
Calls each of the listeners registered for a given event.
Name |
Type |
Description |
event |
String
|
Symbol
|
The event name. |
Returns:
Type |
Description |
Boolean
|
`true` if the event had listeners, else `false`. |
-
eventNames
()Array
inherited
-
Return an array listing the events for which the emitter has registered
listeners.
Returns:
-
-
number of eases
Returns:
-
listenerCount
(event)Number
inherited
-
Return the number of listeners listening to a given event.
Name |
Type |
Description |
event |
String
|
Symbol
|
The event name. |
Returns:
Type |
Description |
Number
|
The number of listeners. |
-
listeners
(event)Array
inherited
-
Return the listeners registered for a given event.
Name |
Type |
Description |
event |
String
|
Symbol
|
The event name. |
Returns:
Type |
Description |
Array
|
The registered listeners. |
-
-
Add a one-time listener for a given event.
Name |
Type |
Default |
Description |
event |
String
|
Symbol
|
|
The event name. |
fn |
function
|
|
The listener function. |
context |
*
|
this
|
optional
The context to invoke the listener with. |
Returns:
-
-
Add a listener for a given event.
Name |
Type |
Default |
Description |
event |
String
|
Symbol
|
|
The event name. |
fn |
function
|
|
The listener function. |
context |
*
|
this
|
optional
The context to invoke the listener with. |
Returns:
-
-
remove eases using Ease object returned by add()
Name |
Type |
Description |
ease |
Ease
|
|
-
-
remove all eases
-
-
Remove all listeners, or those of the specified event.
Name |
Type |
Description |
event |
String
|
Symbol
|
optional
The event name. |
Returns:
-
removeListener
(event, fn, context, once)EventEmitter
inherited
-
Remove the listeners of a given event.
Name |
Type |
Description |
event |
String
|
Symbol
|
The event name. |
fn |
function
|
Only remove the listeners that match this function. |
context |
*
|
Only remove the listeners that have this context. |
once |
Boolean
|
Only remove one-time listeners. |
Returns:
-
removeObjectEases
(element)
-
remove all eases on element
Name |
Type |
Description |
element |
HTMLElement
|
|
-
-
start animation loop (automatically called unless options.autostart=false)
-
-
stop animation loop
-
-
update frame; this is called automatically if start() is used
Name |
Type |
Description |
elapsed |
number
|
time in ms |