EventDispatcher
new EventDispatcher()THREE equivalent: THREE.EventDispatcher
Base class for objects that emit events. All scene-graph nodes and controls extend this.
Methods
Section titled “Methods”| Method | Description |
|---|---|
addEventListener(type: string, listener: Function): this |
Registers a listener for events of the given type. |
removeEventListener(type: string, listener: Function): this |
Removes a previously registered listener. |
hasEventListener(type: string, listener: Function): boolean |
Returns true if the listener is currently registered. |
dispatchEvent(event: { type: string }): void |
Calls all listeners registered for the given event type. |