Added MSA.onDestroy and MCA.getSize

2025-08-28 18:44:03 +02:00
parent 652dc52558
commit 4bf630ccc5
2 changed files with 22 additions and 0 deletions

@@ -137,6 +137,16 @@ api.getModuleID();
**Return** string _The id of the module instance._ **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 ### getResolution
Get the scene resolution. Get the scene resolution.

@@ -78,6 +78,18 @@ api.forceClientCondition(conditionId);
## Events ## 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 ### onSceneChange
Register for a listener when the module is part of a scene change. Register for a listener when the module is part of a scene change.