Multitouch

Wingnut

Well-known member
3rd Party Module Dev
Tutorial Author
Joined
Jan 2, 2020
Messages
1,124
Got a few questions about multitouch. I recently tried to use the TouchDown(#) command on a Windows10 tablet but it just allow me to use one finger.

The same tablet can use multiple fingers on other apps so I know it's not broken and the multitouch works perfectly fine on Android so I know it's not the code. Windows10/11 comes in so many formfactors with multitouch so this makes me wonder, can we use that?

I have the same question regarding HTML5 platform, I don't get multitouch on my phone? Maybe you have to change the template to get the web the multitouch to work, has anyone tried that? HTML5 Works perfectly!
 

Wingnut

Well-known member
3rd Party Module Dev
Tutorial Author
Joined
Jan 2, 2020
Messages
1,124
This is a usable site to test website-based multiouch on all devices even window tablets :

For a win10 tablet you would see this support :

YES : window.TouchEvent
NO : ontouchstart i window
NO : onntouchend in document

YES : window.PointerEvent (as I understand this is normal for devices with mouse only and devices with both mice and touch)

navigator.maxTouchPointer = 10


I added this to the HTML template to suppress pinchzooming the page, this is step one.
It's not yet possible to read the multitouch input from window-tablet as this will need more adjustments as described above.

Code:
<html>
<head>
<!--${APP_TITLE_BEGIN}//-->
<title>CerberusGame</title>
<!--${APP_TITLE_END}//-->
<meta name ="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<style type="text/css">
body{
    height: 100%;
    overflow: hidden; /* keeps scrollbar off IE */
    font-family: arial,sans-serif;
    font-size: 13px;
    color: #fff;
    background-color: #000;
    border: 0 none white;
    padding: 0;
    margin: 0;
    touch-action: none; // This
}
canvas{
    border: 0;
    padding: 0;
    margin: auto;
    display: block;
    outline: none;
    touch-action: none; // This
}
...
 
Last edited:

Wingnut

Well-known member
3rd Party Module Dev
Tutorial Author
Joined
Jan 2, 2020
Messages
1,124
Still working on it, at least the multitouch still works on ios and android browsers, but on Windows10 browser multitouch still do not work
In Edge I get one touch bc how it tries a bit better to adjust for Windows dfiferent use of Web multitouch API. So more work will be needed
to make multitouch Win10/11 browser compatible.

I got great results using with my windowstablet so I need to check how they did it.

Btw the 300ms mentioned on their webpage is also something that people sometimes still asks about. You can safely ignore that it is fixed in all browsers 5 years ago. It's not relevant at all. That was why I was surprised that windows still has their own thing. You need extra work to be windows compatible.
 
Top Bottom