This pointer event data object is passed to all event receivers that are currently active
It contains hit information if an object was hovered or clicked
If the event is received in onPointerDown or onPointerMove, you can call setPointerCapture to receive onPointerMove events even when the pointer has left the object until you call releasePointerCapture or when the pointerUp event happens
You can get additional information about the event or event source via the event property (of type NEPointerEvent)

Implements

Constructors

Properties

button: number

mouse button 0 === LEFT, 1 === MIDDLE, 2 === RIGHT

distance?: number

The distance of the hit point from the origin

the original event

face?: null | Face
inputSource: any

Who initiated this event

instanceId?: number

The instance ID of an object hit by a raycast (if a instanced object was hit)

intersection?: Intersection<Object3D<Object3DEventMap>>

The three intersection

normal?: Vector3

The object-space normal of this event

object: Object3D<Object3DEventMap>

The object this event hit or interacted with

point?: Vector3

The world position of this event

Accessors

  • get deviceIndex(): number
  • the index of the used device
    mouse and touch are always 0, controller is the gamepad index or XRController index

    Returns number

  • get mode(): XRTargetRayMode
  • Returns the input target ray mode e.g. "screen" for 2D mouse and touch events

    Returns XRTargetRayMode

  • get pointerId(): number
  • a combination of the pointerId + button to uniquely identify the exact input (e.g. LeftController:Button0 = 0, RightController:Button1 = 101)

    Returns number

  • get pressure(): number
  • Returns number

  • get propagationStopped(): boolean
  • Returns boolean

  • get used(): boolean
  • Returns boolean

    true when use() has been called. Default: false

Methods

  • call this method in onPointerDown or onPointerMove to stop receiving onPointerMove events

    Returns void

  • Call this method in onPointerDown or onPointerMove to receive onPointerMove events for this pointerId even when the pointer has left the object until you call releasePointerCapture or when the pointerUp event happens

    Returns void

  • Call this method to stop immediate propagation on the event object.
    WARNING: this is currently equivalent to stopImmediatePropagation

    Returns void

  • Returns void

    use stopPropagation()

  • Returns void

    use use()