dispatchEvent

You can send Interaction’s Custom Events with a value to the Model to trigger interactions and affect their conditions.

dispatchEvent (
	eventName: string
	value?: number | string | boolean | void
): Promise<void>
Parameters
Description
Type

eventName

ApiEvents Name of the event listener the method will remove.

value (optional)

Value you want to send along.

number | string | boolean | void

Usage

await modelApi.dispatchEvent("temperature", 26);

Examples

Last updated