Repository

Runner

A runner is used to instanciate a Mobilizing.js user's script inside a specific context. It is requiered to use a Runner to initiate a context and to attech a script to it.

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
public
public

Method Summary

Public Methods
public

onFrameBegin

public

onFrameEnd

Private Methods
private

loop()

Runner's requestAnimationFrame loop manager

private

run()

Runs the runner, create the preLoader and launch it, then execute the script.

private

Starts the loop of the user's script, that is the update function

Public Constructors

public constructor(params: Object) source

Params:

NameTypeAttributeDescription
paramsObject

Parameters object, given by the constructor.

params.context*

{Context} Mobilizing context to run

Example:

Public Members

public autoPrepare: * source

public context: * source

public frame: number source

public useCSSLoader: * source

Public Methods

public onFrameBegin() source

onFrameBegin

public onFrameEnd() source

onFrameEnd

Private Methods

private loop() source

Runner's requestAnimationFrame loop manager

private run() source

Runs the runner, create the preLoader and launch it, then execute the script. NB : this fires a "setupDone" event to inform any exterior process that setup has ended

private startLoop() source

Starts the loop of the user's script, that is the update function