Added MSA.onDestroy and MCA.getSize
@@ -137,6 +137,16 @@ api.getModuleID();
|
||||
|
||||
**Return** string _The id of the module instance._
|
||||
|
||||
### getSize
|
||||
|
||||
Get the size of the module.
|
||||
|
||||
```javascript
|
||||
api.getSize();
|
||||
```
|
||||
|
||||
**Returns** { width:number, height:number } _Size of the module._
|
||||
|
||||
### getResolution
|
||||
|
||||
Get the scene resolution.
|
||||
|
||||
@@ -78,6 +78,18 @@ api.forceClientCondition(conditionId);
|
||||
|
||||
## Events
|
||||
|
||||
### onDestroy
|
||||
|
||||
Register a listener for when the module is destroyed from a channel. Make sure you stop your clocks and render loops here.
|
||||
|
||||
```javascript
|
||||
api.onDestroy(callback);
|
||||
```
|
||||
|
||||
| Argument | Type | Description |
|
||||
| -------- | -------- | ------------------------------------------------------------ |
|
||||
| callback | ( ):void | Function that will be called when the module gets destroyed. |
|
||||
|
||||
### onSceneChange
|
||||
|
||||
Register for a listener when the module is part of a scene change.
|
||||
|
||||
Reference in New Issue
Block a user