Interface: PluginContext<C>
Defined in: core/types.ts:120
The services that the engine gives to a plugin in setup.
Type Parameters
| Type Parameter | Default type |
|---|---|
C | unknown |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
bus | readonly | EventBus | The event bus of the wand. | core/types.ts:124 |
surface | readonly | SurfaceInfo | The surface of the wand. | core/types.ts:126 |
wand | readonly | Wand<C> | The wand that owns the plugin. | core/types.ts:122 |
Methods
onPointer()
ts
onPointer(handler): () => void;Defined in: core/types.ts:128
Adds a pointer handler. Returns a function that removes the handler.
Parameters
| Parameter | Type |
|---|---|
handler | (event) => void |
Returns
() => void
reportError()
ts
reportError(error): void;Defined in: core/types.ts:130
Sends an error to the error events of the wand.
Parameters
| Parameter | Type |
|---|---|
error | unknown |
Returns
void