Class: PickFire
Management and triggering for picking 3D objects
Hierarchy
↳
PickFire
Constructors
Properties
Methods
- dispatchEvent
- destroy
- addEventListener
- removeEventListener
- removeEventListenerAt
- removeAllEventListener
- containEventListener
- hasEventListener
- start
- stop
Constructors
constructor
• new PickFire(view
): PickFire
Parameters
Name | Type |
---|---|
view | View3D |
Returns
Overrides
Defined in
Properties
ray
• ray: Ray
The ray used to pick 3D objects
Defined in
isTouching
• isTouching: boolean
= false
whether it's touching
Defined in
mouseEnableMap
• mouseEnableMap: Map
<number
, ColliderComponent
>
a map records the association information between meshID(matrix id) and ColliderComponent
Defined in
Methods
dispatchEvent
▸ dispatchEvent(event
): void
Dispatch an event to all registered objects with a specific type of listener.
Parameters
Name | Type |
---|---|
event | CEvent |
Returns
void
Inherited from
CEventDispatcher.dispatchEvent
Defined in
src/event/CEventDispatcher.ts:24
destroy
▸ destroy(): void
release all registered event.
Returns
void
Inherited from
Defined in
src/event/CEventDispatcher.ts:55
addEventListener
▸ addEventListener(type
, callback
, thisObject
, param?
, priority?
): number
register an event listener to event distancher.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
type | string | number | undefined | {string} event type. |
callback | Function | undefined | {Function} The callback function that handles events. This function must accept an Event3D object as its unique parameter and cannot return any result. for example: function(evt:Event3D):void. |
thisObject | any | undefined | {any} Current registration object, it'll call callback function. |
param | any | null | {any} the data binded to registered event, the default value is null. |
priority | number | 0 | {number} The priority of callback function execution, with a larger set value having priority to call |
Returns
number
Returns register event id
Inherited from
CEventDispatcher.addEventListener
Defined in
src/event/CEventDispatcher.ts:79
removeEventListener
▸ removeEventListener(type
, callback
, thisObject
): void
Remove Event Listening
Parameters
Name | Type | Description |
---|---|---|
type | string | number | {string} event type |
callback | Function | {Function} callback function of event register |
thisObject | any | {any} The current registered object. |
Returns
void
Inherited from
CEventDispatcher.removeEventListener
Defined in
src/event/CEventDispatcher.ts:113
removeEventListenerAt
▸ removeEventListenerAt(id
): boolean
Remove an event Listening with id
Parameters
Name | Type |
---|---|
id | number |
Returns
boolean
Inherited from
CEventDispatcher.removeEventListenerAt
Defined in
src/event/CEventDispatcher.ts:133
removeAllEventListener
▸ removeAllEventListener(eventType?
): void
Specify a event type to remove all related event listeners eventType event type, set null to remove all event listeners
Parameters
Name | Type | Default value |
---|---|---|
eventType | string | number | null |
Returns
void
Inherited from
CEventDispatcher.removeAllEventListener
Defined in
src/event/CEventDispatcher.ts:153
containEventListener
▸ containEventListener(type
): boolean
whether the target presence of a listener with event type.
Parameters
Name | Type | Description |
---|---|---|
type | string | {string} event type. |
Returns
boolean
Returns a boolean.
Inherited from
CEventDispatcher.containEventListener
Defined in
src/event/CEventDispatcher.ts:185
hasEventListener
▸ hasEventListener(type
, callback?
, thisObject?
): boolean
whether the target presence of a listener with event type. it associate more registration parameters.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
type | string | number | undefined | {string} event name. |
callback | Function | null | {Function} callback function of event register. |
thisObject | any | null | {any} The registered object. |
Returns
boolean
Returns a boolean.
Inherited from
CEventDispatcher.hasEventListener
Defined in
src/event/CEventDispatcher.ts:198
start
▸ start(): void
start this manager
Returns
void
Defined in
stop
▸ stop(): void
stop this manager
Returns
void