Options
Menu

Class MouseEvent

A MouseEvent is dispatched when a mouse event occurs over a mouseEnabled object in View. TODO: we don't have screenZ data, tho this should be easy to implement

Hierarchy

  • EventBase

Index

Constructors

constructor

  • Create a new MouseEvent object.

    Parameters

    • type: string

      The type of the MouseEvent.

    Returns MouseEvent

Properties

_iAllowedToPropagate

_iAllowedToPropagate: boolean

_iParentEvent

_iParentEvent: MouseEvent

altKey

altKey: boolean

Indicates whether the Alt key is active (true) or inactive (false).

ctrlKey

ctrlKey: boolean

Indicates whether the Control key is active (true) or inactive (false).

delta

delta: number

Indicates how many lines should be scrolled for each unit the user rotates the mouse wheel.

elementIndex

elementIndex: number

The index of the elements where the event took place.

entity

entity: IEntity

The entity inside which the event took place.

material

material: MaterialBase

The material of the 3d element inside which the event took place.

normal

normal: Vector3D

The normal in object space where the event took place

position

position: Vector3D

The position in object space where the event took place

renderable

renderable: IRenderable

The renderable owner inside which the event took place.

screenX

screenX: number

The horizontal coordinate at which the event occurred in view coordinates.

screenY

screenY: number

The vertical coordinate at which the event occurred in view coordinates.

shiftKey

shiftKey: boolean

Indicates whether the Shift key is active (true) or inactive (false).

target

target: any

Reference to target object

property

target

type

Object

type

type: string

Type of event

property

type

type

String

uv

uv: Point

The uv coordinate inside the draw primitive where the event took place.

view

view: IView

The view object inside which the event took place.

Static CLICK

CLICK: string

Defines the value of the type property of a click3d event object.

Static DOUBLE_CLICK

DOUBLE_CLICK: string

Defines the value of the type property of a doubleClick3d event object.

Static MOUSE_DOWN

MOUSE_DOWN: string

Defines the value of the type property of a mouseDown3d event object.

Static MOUSE_MOVE

MOUSE_MOVE: string

Defines the value of the type property of a mouseMove3d event object.

Static MOUSE_OUT

MOUSE_OUT: string

Defines the value of the type property of a mouseOut3d event object.

Static MOUSE_OVER

MOUSE_OVER: string

Defines the value of the type property of a mouseOver3d event object.

Static MOUSE_UP

MOUSE_UP: string

Defines the value of the type property of a mouseUp3d event object.

Static MOUSE_WHEEL

MOUSE_WHEEL: string

Defines the value of the type property of a mouseWheel3d event object.

Accessors

bubbles

  • get (): boolean
  • inheritdoc

    Returns boolean

sceneNormal

  • get (): Vector3D
  • The normal in scene space where the event took place

    Returns Vector3D

scenePosition

  • get (): Vector3D
  • The position in scene space where the event took place

    Returns Vector3D

Methods

clone

  • Creates a copy of the MouseEvent object and sets the value of each property to match that of the original.

    Returns MouseEvent

stopImmediatePropagation

  • stopImmediatePropagation(): void
  • inheritdoc

    Returns void

stopPropagation

  • stopPropagation(): void
  • inheritdoc

    Returns void

Generated using TypeDoc