The 2D layer · function
pointerTarget
Who should receive pointer input at this position.
Explained in Sprites and tilemaps.
function pointerTarget(state: PointerState, root: UiNode, x: number, y: number): UiNode | nullimport { pointerTarget } from '@driftengine/ui2d';Parameters
| Parameter | Type | Description |
|---|---|---|
state | PointerState | |
root | UiNode | |
x | number | |
y | number |
In depth
A captured node receives it wherever the pointer is, including outside the window. Otherwise it is an ordinary hit test — and while a drag is in progress, the result is remembered as the prospective drop target.