Events & Listeners

Send data to the model, and listen to events sent from the model

You can send data to the model, and also listen to events dispatched from the model.

Api Events

enum ApiEvents 
	INTERACTION_CUSTOM_EVENT = "{custom_event_name}",
	MOUSE_MOVE = "mouse_move",
	MOUSE_DRAG = 'mouse_drag',
	MOUSE_DOWN = "mouse_down",
	MOUSE_UP = 'mouse_up',
	MOUSE_CLICK = "mouse_click",
	MOUSE_WHEEL = 'mouse_wheel',
	KEY_DOWN = 'key_down',
	HOVERED_OBJECT = 'hovered_object',
	CONFIGURATOR_STATE_CHANGE = "configurator_state_change",
	SELECTION_STATE_CHANGE = "configurator_state_change",
}

Event Responses

Custom events need to be setup directly in studio.

configurator_state_change

return ConfigurationState[]

Add event listener

addEventListener

Remove event listener

removeEventListener

Dispatching Custom Events

dispatchEvent

Last updated