← Back to release summary

Altitude/Azimuth for PointerEvents v3

Category
User input
Type
New or changed feature
Status
Enabled by default (Chrome 86)
Intent stage
Start prototyping

Summary

Adds Altitude/Azimuth angles to PointerEvents. Adds TiltX/TiltY to Altitude/Azimuth transformation and Altitude/Azimuth to TiltX/TiltY transformation depending which pair is available from the device.

Motivation

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).

Standards & signals

Docs: https://docs.google.com/document/d/1BkJDlHJvR6jndtJys7IYuqwITgVi6P9iOnfA0z5Cu04/edit?usp=sharing

Explainers: https://docs.google.com/document/d/1BkJDlHJvR6jndtJys7IYuqwITgVi6P9iOnfA0z5Cu04/edit?usp=sharing

View on chromestatus.com