Skip to content

Interface: PluginContext<C> ​

Defined in: core/types.ts:120

The services that the engine gives to a plugin in setup.

Type Parameters ​

Type ParameterDefault type
Cunknown

Properties ​

PropertyModifierTypeDescriptionDefined in
busreadonlyEventBusThe event bus of the wand.core/types.ts:124
surfacereadonlySurfaceInfoThe surface of the wand.core/types.ts:126
wandreadonlyWand<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 ​

ParameterType
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 ​

ParameterType
errorunknown

Returns ​

void