SceneManager
Methods
addEventListener
addEventListener ( type : string, listener: function ) : null
Adds a listener to an event type.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | The type of event to listen to. |
| listener | function | Yes | The function that gets called when the event is fired. |
Returns:
Type: null
getCurrentFloor
async getCurrentFloor(): Promise<?FloorObject, Error>
Returns:
Type: Promise< ?FloorObject, Error >
hasEventListener
hasEventListener( type : string, listener: function ) : boolean
Checks if listener is added to an event type.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | The type of event to listen to. |
| listener | function | Yes | The function that gets called when the event is fired. |
Returns:
Type: null
removeEventListener
removeEventListener ( type : string, listener: function ) : null
Removes a listener from an event type.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | The type of the listener that gets removed. |
| listener | function | Yes | The listener function that gets removed. |
Returns:
Type: null
setCurrentFloor
async setCurrentFloor(floor: FloorObject, animated = true : boolean): Promise<void, Error>
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| floor | ?FloorObject | Yes | - | |
| animated | boolean | No | true |
Returns:
Type: Promise<void, Error>
Events
MOUSE_EVENTS.floor.didChanged
The listener will receive the following parameters
Listener Parameters:
| Name | Type | Description |
|---|---|---|
| data | object | |
| data.previous | ?FloorObject | |
| data.current | ?FloorObject |
