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(data){
var inputManagerInstance = data.manager;
var inputEngineInstance = data.engine;
//do something...
});
Extends
Members
-
_instance
-
Methods
-
inherited init(){Deferred}
-
Returns:
Type Description Deferred -
inherited 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
-