From 34b5b27cda503628e0016abe9573d3c0ce73f4d7 Mon Sep 17 00:00:00 2001 From: Alex Pyzhianov Date: Thu, 31 Mar 2016 12:45:11 +0300 Subject: [PATCH] Fix dispatchEvent parameter Fix dispatchEvent not alowing to add additional properties to event object (as shown in usage example) https://github.com/mrdoob/eventdispatcher.js --- threejs/three.d.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/threejs/three.d.ts b/threejs/three.d.ts index abfa5feb2..be2e3c2e5 100644 --- a/threejs/three.d.ts +++ b/threejs/three.d.ts @@ -756,7 +756,7 @@ declare namespace THREE { addEventListener(type: string, listener: (event: Event) => void ): void; hasEventListener(type: string, listener: (event: Event) => void): void; removeEventListener(type: string, listener: (event: Event) => void): void; - dispatchEvent(event: { type: string; }): void; + dispatchEvent(event: { type: string; [attachment: string]: any; }): void; addIndex(index: any): void; // deprecated, use setIndex() addAttribute(name: any, array: any, itemSize: any): any; // deprecated @@ -863,7 +863,7 @@ declare namespace THREE { addEventListener(type: string, listener: (event: Event) => void ): void; hasEventListener(type: string, listener: (event: Event) => void): void; removeEventListener(type: string, listener: (event: Event) => void): void; - dispatchEvent(event: { type: string; }): void; + dispatchEvent(event: { type: string; [attachment: string]: any; }): void; } @@ -925,7 +925,7 @@ declare namespace THREE { * Fire an event type. * @param type The type of event that gets fired. */ - dispatchEvent(event: { type: string; }): void; + dispatchEvent(event: { type: string; [attachment: string]: any; }): void; } export interface Event { @@ -1243,7 +1243,7 @@ declare namespace THREE { addEventListener(type: string, listener: (event: Event) => void ): void; hasEventListener(type: string, listener: (event: Event) => void): void; removeEventListener(type: string, listener: (event: Event) => void): void; - dispatchEvent(event: { type: string; }): void; + dispatchEvent(event: { type: string; [attachment: string]: any; }): void; } export namespace GeometryUtils { // deprecated @@ -1619,7 +1619,7 @@ declare namespace THREE { addEventListener(type: string, listener: (event: Event) => void ): void; hasEventListener(type: string, listener: (event: Event) => void): void; removeEventListener(type: string, listener: (event: Event) => void): void; - dispatchEvent(event: { type: string; }): void; + dispatchEvent(event: { type: string; [attachment: string]: any; }): void; getChildByName(name: string): Object3D; // deprecated, use getObjectByName() } @@ -2260,7 +2260,7 @@ declare namespace THREE { addEventListener(type: string, listener: (event: Event) => void ): void; hasEventListener(type: string, listener: (event: Event) => void): void; removeEventListener(type: string, listener: (event: Event) => void): void; - dispatchEvent(event: { type: string; }): void; + dispatchEvent(event: { type: string; [attachment: string]: any; }): void; } export interface LineBasicMaterialParameters extends MaterialParameters { @@ -4950,7 +4950,7 @@ declare namespace THREE { addEventListener(type: string, listener: (event: Event) => void ): void; hasEventListener(type: string, listener: (event: Event) => void): void; removeEventListener(type: string, listener: (event: Event) => void): void; - dispatchEvent(event: { type: string; }): void; + dispatchEvent(event: { type: string; [attachment: string]: any; }): void; } export class WebGLRenderTargetCube extends WebGLRenderTarget { @@ -5443,7 +5443,7 @@ declare namespace THREE { addEventListener(type: string, listener: (event: Event) => void ): void; hasEventListener(type: string, listener: (event: Event) => void): void; removeEventListener(type: string, listener: (event: Event) => void): void; - dispatchEvent(event: { type: string; }): void; + dispatchEvent(event: { type: string; [attachment: string]: any; }): void; } export class CanvasTexture extends Texture {