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
| Parameter | Type | Default value |
|---|---|---|
hoverEnabled | boolean | true |
swallowEvents | boolean | false |
cursor | string | "" |
Returns
InteractionComponent
Overrides
Properties
| Property | Modifier | Type | Default value | Inherited from |
|---|---|---|---|---|
cursor | public | string | undefined | - |
dirty | public | boolean | true | Component.dirty |
enabled | public | boolean | true | Component.enabled |
hoverEnabled | public | boolean | undefined | - |
swallowEvents | public | boolean | undefined | - |