createControllerManager
Creates a controller manager.
Syntax
createControllerManager(props);
Parameters
Name | Type | Description |
---|---|---|
props | { [name: string]: unknown; } | Controller props. |
Returns
ControllerManager
- The controller manager.
Example
// create a controller manager
const manager = createControllerManager({
status: true,
});
// listen for status changes
manager.events.on('status', status => {
console.log('new status', status);
});
// change the status
manager.status = false;
Available on: Client Server