1 /**
2 * https://github.com/mrdoob/eventtarget.js/
3 */
4
5 /**@constructor*/
6 THREE.EventTarget = function () {
7
8 var listeners = {};
9
10 this.addEventListener = function ( type, listener ) {
11
12 if ( listeners[ type ] === undefined ) {
13
14 listeners[ type ] = [];
15
16 }
17
18 if ( listeners[ type ].indexOf( listener ) === - 1 ) {
19
20 listeners[ type ].push( listener );
21
22 }
23
24 };
25
26 this.dispatchEvent = function ( event ) {
27
28 for ( var listener in listeners[ event.type ] ) {
29
30 listeners[ event.type ][ listener ]( event );
31
32 }
33
34 };
35
36 this.removeEventListener = function ( type, listener ) {
37
38 var index = listeners[ type ].indexOf( listener );
39
40 if ( index !== - 1 ) {
41
42 listeners[ type ].splice( index, 1 );
43
44 }
45
46 };
47
48 };
49
nike free rn
new balance hombre baratas
cinturones gucci
ugg rebajas
cinturon gucci
ray ban baratas
nike cortez
peuterey mujer
christian louboutin madrid
mbt zapatos
gafas ray ban baratas
mbt ofertas
air max blancas
mbt barcelona
nike air max 90
woolrich barcelona
nike mujer
botas ugg
gafas de sol carrera aratas
air max 2016 baratas
oakley baratas
nike air max 2016