Skip to content

Class: CEvent

Basic class of Event

Hierarchy

Constructors

Properties

Accessors

Methods

Constructors

constructor

new CEvent(eventType?, data?): CEvent

Create a new event, with type and data

Parameters

NameTypeDefault valueDescription
eventTypestringnull{any} eventType
dataanynull{any} param

Returns

CEvent

Defined in

src/event/CEvent.ts:102

Properties

target

target: Object3D

Event target, it's usually event dispatcher

Defined in

src/event/CEvent.ts:13


currentTarget

currentTarget: CEventListener

Current event target, it's current bubble object

Defined in

src/event/CEvent.ts:18


type

type: string

event type, it's registered string of key

Defined in

src/event/CEvent.ts:23


data

data: any

extra data.Used for the transmission process of events, carrying data

Defined in

src/event/CEvent.ts:28


param

param: any

The param data when event is registered

Defined in

src/event/CEvent.ts:34


time

time: number = 0

the time when event is

Defined in

src/event/CEvent.ts:40


delay

delay: number = 0

the delay time when event is dispatched.

Defined in

src/event/CEvent.ts:46


mouseCode

mouseCode: number = 0

mouse code, see

Mouse Code

MouseCode

Defined in

src/event/CEvent.ts:52


ctrlKey

ctrlKey: boolean

Is Ctrl key pressed when the event occurs

Defined in

src/event/CEvent.ts:57


metaKey

metaKey: boolean

Is Meta key pressed when the event occurs

Defined in

src/event/CEvent.ts:62


altKey

altKey: boolean

Is Alt key pressed when the event occurs

Defined in

src/event/CEvent.ts:67


shiftKey

shiftKey: boolean

Is Shift key pressed when the event occurs

Defined in

src/event/CEvent.ts:72


targetTouches

targetTouches: TouchData[]

Collection of finger touch points, which registered

Defined in

src/event/CEvent.ts:77


changedTouches

changedTouches: TouchData[]

Collection of finger touch points changed

Defined in

src/event/CEvent.ts:82


touches

touches: TouchData[]

Collection of finger touch points

Defined in

src/event/CEvent.ts:87


view

view: View3D

binded view3D object in event.

Defined in

src/event/CEvent.ts:94

Accessors

isStopImmediatePropagation

get isStopImmediatePropagation(): boolean

Returns stopImmediatePropagation value

Returns

boolean

Defined in

src/event/CEvent.ts:125

Methods

stopImmediatePropagation

stopImmediatePropagation(): void

Prevent bubbling of all event listeners in subsequent nodes of the current node in the event flow.

Returns

void

Defined in

src/event/CEvent.ts:110