Skip to main content

Class: PointerEventExt<T, R>

Events.PointerEventExt

Represents a custom extended pointer event.

Type parameters

NameTypeDescription
TObject3DThe type of the primary target for the event (default is Object3D).
RObject3DThe type of the related target for the event (default is Object3D).

Hierarchy

Constructors

constructor

new PointerEventExt<T, R>(event, intersection, relatedTarget?, cancelable?)

Type parameters

NameType
TObject3D<Object3DEventMap>
RObject3D<Object3DEventMap>

Parameters

NameTypeDescription
eventMouseEventOriginal dom event.
intersectionIntersectionExtThe intersection information between the mouse event and 3D objects in the scene.
relatedTarget?RThe secondary target for the event.
cancelable?booleanA boolean value indicating whether the event is cancelable.

Inherited from

MouseEventExt.constructor

Defined in

src/events/Events.ts:208

Properties

cancelable

Readonly cancelable: any

A boolean value indicating whether the event is cancelable.

Inherited from

MouseEventExt.cancelable

Defined in

src/events/Events.ts:116


currentTarget

currentTarget: T

A reference to the currently registered target for the event. This is the object to which the event is currently slated to be sent. It's possible this has been changed along the way through retargeting.

Inherited from

MouseEventExt.currentTarget

Defined in

src/events/Events.ts:118


intersection

Readonly intersection: IntersectionExt

Returns the intersection information between the mouse event and 3D objects in the scene.

Inherited from

MouseEventExt.intersection

Defined in

src/events/Events.ts:200


relatedTarget

Readonly relatedTarget: R

The secondary target for the event, if there is one.

Inherited from

MouseEventExt.relatedTarget

Defined in

src/events/Events.ts:192


timeStamp

Readonly timeStamp: number

The time at which the event was created (in milliseconds). By specification, this value is time since epoch—but in reality, browsers' definitions vary. In addition, work is underway to change this to be a DOMHighResTimeStamp instead.

Inherited from

MouseEventExt.timeStamp

Defined in

src/events/Events.ts:124

Accessors

altKey

get altKey(): boolean

Returns true if the alt key was down when the mouse event was fired.

Returns

boolean

Inherited from

MouseEventExt.altKey

Defined in

src/events/Events.ts:166


bubbles

get bubbles(): boolean

A boolean value indicating whether or not the event bubbles up through the DOM.

Returns

boolean

Inherited from

MouseEventExt.bubbles

Defined in

src/events/Events.ts:114


button

get button(): number

The button number that was pressed (if applicable) when the mouse event was fired.

Returns

number

Inherited from

MouseEventExt.button

Defined in

src/events/Events.ts:168


buttons

get buttons(): number

The buttons being pressed (if any) when the mouse event was fired.

Returns

number

Inherited from

MouseEventExt.buttons

Defined in

src/events/Events.ts:170


clientX

get clientX(): number

The X coordinate of the mouse pointer in local (DOM content) coordinates.

Returns

number

Inherited from

MouseEventExt.clientX

Defined in

src/events/Events.ts:172


clientY

get clientY(): number

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

Returns

number

Inherited from

MouseEventExt.clientY

Defined in

src/events/Events.ts:174


ctrlKey

get ctrlKey(): boolean

Returns true if the control key was down when the mouse event was fired.

Returns

boolean

Inherited from

MouseEventExt.ctrlKey

Defined in

src/events/Events.ts:176


defaultPrevented

get defaultPrevented(): boolean

Indicates whether or not the call to event.preventDefault() canceled the event.

Returns

boolean

Inherited from

MouseEventExt.defaultPrevented

Defined in

src/events/Events.ts:120


height

get height(): number

The height (magnitude on the Y axis), in CSS pixels, of the contact geometry of the pointer.

Returns

number

Defined in

src/events/Events.ts:233


isPrimary

get isPrimary(): boolean

Indicates if the pointer represents the primary pointer of this pointer type.

Returns

boolean

Defined in

src/events/Events.ts:247


metaKey

get metaKey(): boolean

Returns true if the meta key was down when the mouse event was fired.

Returns

boolean

Inherited from

MouseEventExt.metaKey

Defined in

src/events/Events.ts:178


movementX

get movementX(): number

The X coordinate of the pointer relative to the position of the last event.

Returns

number

Inherited from

MouseEventExt.movementX

Defined in

src/events/Events.ts:180


movementY

get movementY(): number

The Y coordinate of the pointer relative to the position of the last event.

Returns

number

Inherited from

MouseEventExt.movementY

Defined in

src/events/Events.ts:182


offsetX

get offsetX(): number

The X coordinate of the mouse pointer relative to the position of the padding edge of the target node.

Returns

number

Inherited from

MouseEventExt.offsetX

Defined in

src/events/Events.ts:184


offsetY

get offsetY(): number

The Y coordinate of the mouse pointer relative to the position of the padding edge of the target node.

Returns

number

Inherited from

MouseEventExt.offsetY

Defined in

src/events/Events.ts:186


pageX

get pageX(): number

The X coordinate of the mouse pointer relative to the whole document.

Returns

number

Inherited from

MouseEventExt.pageX

Defined in

src/events/Events.ts:188


pageY

get pageY(): number

The Y coordinate of the mouse pointer relative to the whole document.

Returns

number

Inherited from

MouseEventExt.pageY

Defined in

src/events/Events.ts:190


pointerId

get pointerId(): number

A unique identifier for the pointer causing the event.

Returns

number

Defined in

src/events/Events.ts:229


pointerType

get pointerType(): string

Indicates the device type that caused the event (mouse, pen, touch, etc.).

Returns

string

Defined in

src/events/Events.ts:245


pressure

get pressure(): number

The normalized pressure of the pointer input in the range 0 to 1, where 0 and 1 represent the minimum and maximum pressure the hardware is capable of detecting, respectively.

Returns

number

Defined in

src/events/Events.ts:235


screenX

get screenX(): number

The X coordinate of the mouse pointer in global (screen) coordinates.

Returns

number

Inherited from

MouseEventExt.screenX

Defined in

src/events/Events.ts:194


screenY

get screenY(): number

The Y coordinate of the mouse pointer in global (screen) coordinates.

Returns

number

Inherited from

MouseEventExt.screenY

Defined in

src/events/Events.ts:196


shiftKey

get shiftKey(): boolean

Returns true if the shift key was down when the mouse event was fired.

Returns

boolean

Inherited from

MouseEventExt.shiftKey

Defined in

src/events/Events.ts:198


tangentialPressure

get tangentialPressure(): number

The normalized tangential pressure of the pointer input (also known as barrel pressure or cylinder stress) in the range -1 to 1, where 0 is the neutral position of the control.

Returns

number

Defined in

src/events/Events.ts:237


target

get target(): T

A reference to the object to which the event was originally dispatched.

Returns

T

Inherited from

MouseEventExt.target

Defined in

src/events/Events.ts:122


tiltX

get tiltX(): number

The plane angle (in degrees, in the range of -90 to 90) between the Y–Z plane and the plane containing both the pointer (e.g. pen stylus) axis and the Y axis.

Returns

number

Defined in

src/events/Events.ts:239


tiltY

get tiltY(): number

The plane angle (in degrees, in the range of -90 to 90) between the X–Z plane and the plane containing both the pointer (e.g. pen stylus) axis and the X axis.

Returns

number

Defined in

src/events/Events.ts:241


twist

get twist(): number

The clockwise rotation of the pointer (e.g. pen stylus) around its major axis in degrees, with a value in the range 0 to 359.

Returns

number

Defined in

src/events/Events.ts:243


type

get type(): keyof MiscEvents | keyof InteractionEvents<Object3D<Object3DEventMap>, Object3D<Object3DEventMap>, Object3D<Object3DEventMap> | InstancedMeshEntity> | keyof UpdateEvents

The case-insensitive name identifying the type of the event.

Returns

keyof MiscEvents | keyof InteractionEvents<Object3D<Object3DEventMap>, Object3D<Object3DEventMap>, Object3D<Object3DEventMap> | InstancedMeshEntity> | keyof UpdateEvents

Inherited from

MouseEventExt.type

Defined in

src/events/Events.ts:126


width

get width(): number

The width (magnitude on the X axis), in CSS pixels, of the contact geometry of the pointer.

Returns

number

Defined in

src/events/Events.ts:231

Methods

getModifierState

getModifierState(keyArg): boolean

Returns the current state of the specified modifier key. See KeyboardEvent.getModifierState() for details.

Parameters

NameType
keyArgstring

Returns

boolean

Inherited from

MouseEventExt.getModifierState

Defined in

src/events/Events.ts:216


preventDefault

preventDefault(): void

Cancels the event.

Returns

void

Inherited from

MouseEventExt.preventDefault

Defined in

src/events/Events.ts:142


stopImmediatePropagation

stopImmediatePropagation(): void

For this particular event, prevent all other listeners from being called. This includes listeners attached to the same element as well as those attached to elements that will be traversed later (during the capture phase, for instance).

Returns

void

Inherited from

MouseEventExt.stopImmediatePropagation

Defined in

src/events/Events.ts:147


stopPropagation

stopPropagation(): void

Stops the propagation of events further along in the Object3D hierarchy.

Returns

void

Inherited from

MouseEventExt.stopPropagation

Defined in

src/events/Events.ts:152