Class: InputManager

mmir. InputManager

new mmir.InputManager()

The InputManager handles input events.

On initialization, the InputManager also creates the mmir.InputEngine, and returns it as the second argument of the init() function's callback (or the Promise's triggered callbacks). In addition, the InputEngine is exported as module "mmirf/inputEngine" via RequireJS' define() function.

Example
//initialization of inputManager
require('mmirf/inputManager').init().then( function(inputManagerInstance, inputEngineInstance){
		//do something
});

Requires

  • module:mmir.require
  • module:mmir._define

Members

_instance

Methods

raise(eventName, eventData)

This function raises an event.
Name Type Description
eventName String The name of the event which is to be raised
eventData Object optional OPTIONAL Data belonging to the event
Throws:
if this function is invoked while the internal event/state engine (i.e. mmir.InputEngine is not initialized yet
Type
Error