I wanted to use .rotationAngle property in my code, but for some reason it is always 0 for me. https://developer.mozilla.org/en-US/docs/Web/API/Touch/rotationAngle . Is this some sort of bug, or this requires a special kind of device?
To test if it is 0 for you as well, go here https://codepen.io/niko484820/pen/oNJoVvM . Important edit: make sure that the area of contact is long enough, I did read that it will be 0 if area of contact is close to a circle.
Or you can test it by going here https://www.w3schools.com/jsreF/event_touch_touches.asp or directly to here https://www.w3schools.com/jsreF/tryit.asp?filename=tryjsref_event_touch_touches2 , and replacing var x = event.touches[0].clientX with var x = event.touches[0].rotationAngle
.radiusX and .radiusY properties work somewhat properly, but they are useless for determining the shape of finger without .rotationAngle. I need those because I want to be able to press two on-screen buttons with same finger, and without understanding the shape of finger I can only click one of them or the space between buttons.
Is there an android application to display .rotationAngle information, or what analogue of that android os has?
I tested both on android chrome and android firefox, but I'm still not sure if this is a browser issue, an os issue, an os setting issue, or a device issue.
The android equivalent of javascript .rotationAngle is MotionEvent.PointerProperties.orientation https://developer.android.com/reference/android/view/MotionEvent.PointerCoords#orientation . I might try to make an android application that would check if this works, but setting up java development environment might take some time.
Some test tools that might be of use are https://tecagile.com/online-touch-screen-test/ and https://patrickhlauke.github.io/touch/ .
Created a bug report on mozilla bugtracker https://bugzilla.mozilla.org/show_bug.cgi?id=1853570 , he said he can't reproduce the bug. I asked 2 people offsite to confirm this, it was 0 for them, and one comment here (deleted now for some reason?) confirmed that it is also 0 for him, yet for them it works? I'd pointed them to comment here, but now it's missing. I kinda suspect that it is a recent regression, I have faint memories of tecagile test working better for me month ago, but I can't confirm that. It might be an os issue.
Anyway, I decided to not use rotationAngle since it's apparently unreliable for many users.
This api itself feels broken to me https://developer.mozilla.org/en-US/docs/Web/API/Touch/rotationAngle . Documentation says that it goes from 0 to 90, but it should go negative too to be of any use, or go from 0 to 180. The granddad of that goes from -pi/2 to pi/2 https://developer.android.com/reference/android/view/MotionEvent.PointerCoords#orientation