Intent to Prototype: Altitude/Azimuth for PointerEvents v3

61 views
Skip to first unread message

Liviu Tinta

unread,
Apr 16, 2020, 5:33:36 PM4/16/20
to blink-dev
liviu...@chromium.org,nzol...@chromium.org https://docs.google.com/document/d/1BkJDlHJvR6jndtJys7IYuqwITgVi6P9iOnfA0z5Cu04/edit?usp=sharing https://docs.google.com/document/d/1BkJDlHJvR6jndtJys7IYuqwITgVi6P9iOnfA0z5Cu04/edit?usp=sharing Add Altitude/Azimuth angles to PointerEvents. Implement TiltX/TiltY to Altitude/Azimuth transformation and Altitude/Azimuth to TiltX/TiltY transformation depending which pair is available from the device. There are two common ways for determining the inclination of a stylus: - tiltX (angle between plane (pen,Y) and plane (Y,Z), tiltY (angle between plane (pen, X) and plane (X,Z) - altitude (angle between stylus and screen), azimuth (angle between X axis and stylus' projection on screen) tiltX, tiltY are the angles commonly measured by devices right now. Altitude and Azimuth can be calculated using trigonometry from tiltX, tiltY. From a hardware perspective it is easier and less expensive to measure tiltX/tiltY. From a stylus app perspective the API altitude/azimuth makes more sense and is more intuitive for users. Using tiltX/tiltY requires a developer to visualize the intersection/angle between two imaginary planes, while azimuth, altitude are easier to visualize just by looking at the pen and the screen surface. Adding azimuth/altitude allows developers to use a more intuitive API. Providing conversion between tiltX/tiltY and altitude/azimuth and vice versa allows for backwards compatibility with apps using tiltX/tiltY (even if newer devices might only return altitude/azimuth).
An Apple engineer working on altitude/azimuth implementation originated this request: https://github.com/w3c/pointerevents/issues/274#issuecomment-458347176. There is no information from other browsers (Firefox, Edge). Edge based on Chromium will have support as it is based on Chromium. Firefox: No public signals Edge: No public signals Safari: In development (https://github.com/w3c/pointerevents/issues/274#issuecomment-458347176) Web developers: No signals
Yes Yes Web Platform Tests will be part of https://crbug.com/1069500. https://chromestatus.com/feature/5731966710185984

Reply all
Reply to author
Forward
0 new messages