diff --git a/ModuleClientAPI.md b/ModuleClientAPI.md index a1df821..f5bc6bd 100644 --- a/ModuleClientAPI.md +++ b/ModuleClientAPI.md @@ -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. diff --git a/ModuleServerAPI.md b/ModuleServerAPI.md index f1d74a6..f705fdb 100644 --- a/ModuleServerAPI.md +++ b/ModuleServerAPI.md @@ -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.