Hi, everyone,
I’m struggling with this “Max number of touches exceeded. Ignoring touches in excess of 2” warning.
I’ll describe what I think the problem is:
When the pointer leaves and re-enters the canvas element, it retains the same pointerId. However, if the pointer leaves and re-enters the page or if the pen temporarily leaves the tablet’s hover range, it is assigned a new pointerId.
In BJS’s webDeviceInputSystem, these IDs are stored in a limited-size _activeTouchIds array. The issue is that this array is not cleared of the previous pointerId used by the pen when a new one is assigned. It seems that this clearing only occurs within the element “blur” and “pointercancel” events.
For context, I’m using a Wacom Intuos tablet with Windows Ink enabled (If Windows Ink is disabled, the browser just treats the pen like a mouse)