Global

Methods

add(child) → {object}

add children to MultimediaObject

Parameters:
Name Type Description
child DOMElement

the child to add

Source:
Returns:

MultimediaObject

Type
object

addAnimationKeyframe(time, prop, value, easing)

An an animation keyframe

Parameters:
Name Type Description
time number

the time from which delete the propertie

prop string

the propertie name

value string | number

the propertie value

easing string

the easing name

Source:

addAnimationProperties(propertieArray, absoluteTime)

Add a animation propertie

Parameters:
Name Type Description
propertieArray array

the propertie array propertie = { key, value }

absoluteTime number

the time key in which to add the propertie

Source:

addDefaultParameters()

Add the default parameters set in the config file based on the type

Source:

addGlobalStyle(style, callback) → {object}

Add a global style object to the page

Parameters:
Name Type Description
style object

the CSS style properties to apply

callback function

the callback to execute

Source:
Returns:

MultimediaObject

Type
object

addListener(listener, fn, glob)

Add an event listener or a custom event

Parameters:
Name Type Description
listener string

the name of the event

fn function

the function to execute on event dispatch

glob boolean

is the custom event global or bind to the object id

Source:

appendElementTo(container) → {object}

append MultimediaObject.element to container parameter

Parameters:
Name Type Description
container DOMElement | MultimediaObject

the container to append to

Source:
Returns:

MultimediaObject

Type
object

applyAttributes(attributes) → {object}

Apply the attributes to the DOMElement and attributes propertie of the MultimediaObject

Parameters:
Name Type Description
attributes object

key = name of attribute, value = value.

Source:
Returns:

MultimediaObject

Type
object

applyBreakpoints(breakpoints) → {object}

Apply the breakpoints

Parameters:
Name Type Description
breakpoints array

breakpoint object {{querie,style}}

Source:
Returns:

MultimediaObject

Type
object

applyDependencies(dependencies) → {object}

Require dependencies and add it to a dependencie bundle

Parameters:
Name Type Description
dependencies object

the dependencies to fetch

Source:
Returns:

MultimediaObject

Type
object

applyEvents(attributes) → {object}

Apply the events to the DOMElement and events propertie of the MultimediaObject

Parameters:
Name Type Description
attributes object

key = name of event, value = function.

Source:
Returns:

MultimediaObject

Type
object

applyFunctions(functions) → {object}

Apply the functions as method of the MultimediaObject

Parameters:
Name Type Description
functions object

key = name of functions, value = function body.

Source:
Returns:

MultimediaObject

Type
object

applyIteration(iteration)

Apply the current iteration

Parameters:
Name Type Description
iteration object

the iteration pbject

Source:

applyStyle(properties) → {object}

Apply the object in parameter as style properties

Parameters:
Name Type Description
properties object

the CSS style properties to apply

Source:
Returns:

MultimediaObject

Type
object

changeAnimation(animationName)

Change the currentAnimation

Parameters:
Name Type Default Description
animationName string default

the animation name on which to switch

Source:

checkBreakpoints()

check each breakpoints on container or window, and applyStyle if needed

Source:

checkDep(dependency, pushOrSplice)

Check dependencies and perform action on the array

Parameters:
Name Type Default Description
dependency string

the dependency

pushOrSplice string push

push or splice

Source:

deactivateEvent(eventName)

Deactivate events without deleting them

Parameters:
Name Type Description
eventName string

the event to deactivate

Source:

deleteAnimationKeyframe(time, prop)

Delete an animation keyframe

Parameters:
Name Type Description
time number

the time from which delete the propertie

prop string

the propertie name

Source:

deleteAnimationProperties(propertieArray)

Delete an animation propertie

Parameters:
Name Type Description
propertieArray array

the propertie array propertie = { key, value }

Source:

dispatchEvent(eventName, params, glob)

Dispatch a custom event

Parameters:
Name Type Description
eventName string

the name of the event

params object

the parameter to transmit

glob boolean

is the custom event global or bind to the object id

Source:

exportToJSON() → {object}

Export the object as a reusable JSON

Source:
Returns:

the JSON representation of the object

Type
object

generate(type) → {object}

Generates the DOMElement based on type parameter

Parameters:
Name Type Description
type string

type of DOMElement

Source:
Returns:

MultimediaObject

Type
object

getComputedStyle(propertie) → {string}

get the computed style of a CSS propertie

Parameters:
Name Type Description
propertie string

the css propertie

Source:
Returns:

css - pixel value

Type
string

getSortedSteps() → {array}

Sorts the animations steps

Source:
Returns:

the numeric array of the steps sorted >=

Type
array

getTotalAnimationTime() → {number}

Return total animation time

Source:
Returns:

the total animation time

Type
number

init()

Inititalize the MultimediaObject generates the DOMElement, applyAttributes, sorts animations steps

Source:

interpolateStep(currentIteration, seconds, fps) → {object}

frame interpolation, takes the value present at a certain frame in the interpolatedSteps array and apply it as style needs an animation loop

Parameters:
Name Type Description
currentIteration int

the current frame

seconds float

the current frame

fps int

the framerate to preinterpolate if needed

Source:
Returns:

MultimediaObject

Type
object

loadFromJSON(json)

load a JSON representation of a MultimediaObject

Parameters:
Name Type Description
json object

a json representation of a MultimediaObject

Source:

preInterpolateStep(fps) → {object}

pre interpolate animations steps for interpolation

Parameters:
Name Type Description
fps int

the framerate to use as base for the frame computation

Source:
Returns:

MultimediaObject

Type
object

remove(child) → {object}

removes a child from a MultimediaObject

Parameters:
Name Type Description
child DOMElement

the child to remove

Source:
Returns:

MultimediaObject

Type
object

removeDependencies(dependencies)

Remove dependencies from the dependencies array if it exists

Parameters:
Name Type Description
dependencies array | string

the array of dependencies to delete

Source:

removeEvent(eventName) → {object}

Remove an event by eventName

Parameters:
Name Type Description
eventName string

name of the event

Source:
Returns:

MultimediaObject

Type
object

removeFunction(eventName) → {object}

Remove a function by name

Parameters:
Name Type Description
eventName string

name of the function

Source:
Returns:

MultimediaObject

Type
object

removeListener(listener, fn, glob)

Remove an event

Parameters:
Name Type Description
listener string

the name of the event

fn function

the function to remove

glob boolean

is the custom event global or bind to the object id

Source:

removePropertie(type, propertieName) → {object}

Remove a propertie

Parameters:
Name Type Description
type string

type of propertie

propertieName string

name of the propertie

Source:
Returns:

MultimediaObject

Type
object

requireDependencies(callback)

Require the dependencies and make them available in a certain context

Parameters:
Name Type Description
callback function

the callback with the contexts

Source:

restartAnimation()

Restart the animation

Source:

runAnimation(time)

The animatiom cycle function

Parameters:
Name Type Description
time number

the time om witch iterate

Source:

setAbsoluteAssetURL(json)

Set the absoluteAssetURL of the object

Parameters:
Name Type Description
json object

the json representation of a MultimediaObject

Source:

startAnimation()

start the animation

Source:

stopAnimation()

Stop the animation

Source:

transformEvent(callback) → {function}

tranform event to get access to it with removeEventListener

Parameters:
Name Type Description
callback function

the event you want to transform

Source:
Returns:

function

Type
function