function registerPointerEvent(eventType, region, callback) {
	// make sure the mouse/touch events are initialized
	enablePointerEvent();

	if (pointerEventList.indexOf(eventType) === -1) {
		throw new Error("invalid event type : " + eventType);
	}

	if (typeof region === "undefined") {
		throw new Error(
			"registerPointerEvent: region for " +
				toString(region) +
				" event is undefined ",
		);
	}

	const eventTypes = findAllActiveEvents(
		activeEventList,
		pointerEventMap[eventType],
	);

	// register the event
	if (!eventHandlers.has(region)) {
		eventHandlers.set(region, {
			region: region,
			callbacks: {},
			pointerId: null,
		});
	}

	// allocate array if not defined
	const handlers = eventHandlers.get(region);
	for (let i = 0; i < eventTypes.length; i++) {
		const eventType = eventTypes[i];
		if (handlers.callbacks[eventType]) {
			handlers.callbacks[eventType].push(callback);
		} else {
			handlers.callbacks[eventType] = [callback];
		}
	}
}
allows registration of event listeners on the object target. <br>
melonJS will pass a me.Pointer object to the defined callback.
@see Pointer
@see {@link http://www.w3.org/TR/pointerevents/#list-of-pointer-events | W3C Pointer Event list}
@memberof input
@param {string} eventType - The event type for which the object is registering <br>
melonJS currently supports: <br>
<ul>
  <li><code>"pointermove"</code></li>
  <li><code>"pointerdown"</code></li>
  <li><code>"pointerup"</code></li>
  <li><code>"pointerenter"</code></li>
  <li><code>"pointerover"</code></li>
  <li><code>"pointerleave"</code></li>
  <li><code>"pointercancel"</code></li>
  <li><code>"wheel"</code></li>
</ul>
@param {Rect|Polygon|Line|Ellipse} region - a shape representing the region to register on
@param {Function} callback - methods to be called when the event occurs.
Returning `false` from the defined callback will prevent the event to be propagated to other objects
@example
 // onActivate function
 onActivateEvent: function () {
    // register on the 'pointerdown' event
    me.input.registerPointerEvent('pointerdown', this, (e) => this.pointerDown(e));
 },

 // pointerDown event callback
 pointerDown: function (pointer) {
   // do something
   ....
   // don"t propagate the event to other objects
   return false;
 },