Because of the project transformation, the use of the 2D WEBG Pixi Library, then based on the structure of the canvas, the event is the biggest problem
The principle of transformation is very simple, the hammer inside the Addeventlisteners event bound to a third-party library instead, the binding of the event is controlled by a third party
Hammer is responsible for receiving event messages.
Pass a Pixi reference, which is a reference to the Sprite object inside each canvas, because each object is bound to an event
Hammer internal:
Hammer Addeventlisteners event bindings are replaced by third-party bindings
Replace
Note that one of the problems is:
The EV given by Hammer is a packaged object, so it takes Ev.originalevent, the event object
The last modification of the Touchaction class, canvas is not, so when it comes to calling touchaction, you need to judge the cancellation
At this point, the hammer Library is perfectly supported by the pixi.js-2d Webg/canvas Library ....
Let hammer perfectly support pixi.js-2d WEBG Library