Skip to content

Class: InteractionComponent ​

Opts an entity into pointer hit-testing. Adding the component registers hit-testing with the renderer; removing or disabling it stops. hoverEnabled false skips enter/leave/move work — worth turning off for touch-only playables. swallowEvents stops bubbling to ancestors. cursor is a CSS cursor name; "" leaves the canvas cursor alone.

Extends ​

Constructors ​

Constructor ​

ts
new InteractionComponent(
   hoverEnabled?, 
   swallowEvents?, 
   cursor?
): InteractionComponent;

Parameters ​

ParameterTypeDefault value
hoverEnabledbooleantrue
swallowEventsbooleanfalse
cursorstring""

Returns ​

InteractionComponent

Overrides ​

Component.constructor

Properties ​

PropertyModifierTypeDefault valueInherited from
cursorpublicstringundefined-
dirtypublicbooleantrueComponent.dirty
enabledpublicbooleantrueComponent.enabled
hoverEnabledpublicbooleanundefined-
swallowEventspublicbooleanundefined-

© 2026 PlayAdGentic