addEventListener( type, listener ) {

    		if ( this._listeners === undefined ) this._listeners = {};

    		const listeners = this._listeners;

    		if ( listeners[ type ] === undefined ) {

    			listeners[ type ] = [];

    		}

    		if ( listeners[ type ].indexOf( listener ) === - 1 ) {

    			listeners[ type ].push( listener );

    		}

    	}
https://github.com/mrdoob/eventdispatcher.js/