Skip to content

marble3 / Interactable

Interface: Interactable ​

Defined in: src/cursor/look-at-cursor.ts:11

What LookAtCursor calls on the entity under the crosshair. An entity with a physics body opts in by declaring interactRange; the callbacks are optional.

Properties ​

interactRange ​

interactRange: number

Defined in: src/cursor/look-at-cursor.ts:13

How near the camera must be for the entity to take focus, in units.

Methods ​

onCursorEnter()? ​

optional onCursorEnter(): void

Defined in: src/cursor/look-at-cursor.ts:15

The crosshair came onto the entity.

Returns ​

void


onCursorLeave()? ​

optional onCursorLeave(): void

Defined in: src/cursor/look-at-cursor.ts:17

The crosshair left the entity, or the cursor was turned off.

Returns ​

void


onCursorSelect()? ​

optional onCursorSelect(player): void

Defined in: src/cursor/look-at-cursor.ts:19

The entity was clicked while under the crosshair.

Parameters ​

player ​

Player

Returns ​

void