The lab · High school, age 15–16 (French seconde: physics-chemistry and SNT, the French digital-science course)
What a website can read from your phone's sensors
Looping doesn't need installing: it's a web page. Yet it reads your phone's gyroscope and accelerometer. Here is exactly what a site receives, how often, what it can't see, and why your phone asks for your consent first.
One event, sixty times a second
In the browser, motion sensors arrive through an event called devicemotion, defined by a specification from the W3C, the body that standardizes the Web. Each event carries:
- the acceleration, with and without gravity, along the phone's three axes, in m/s²;
- the rotation speed around the three axes, in degrees per second;
- the interval between two readings, in milliseconds.
On an iPhone 16, Safari delivers 60 of them per second: one reading every 16.7 ms. A 2-second throw is therefore 120 readings per sensor and per axis.
| Field | What it gives | Unit |
|---|---|---|
| acceleration | acceleration without gravity (x, y, z) | m/s² |
| accelerationIncludingGravity | acceleration with gravity (x, y, z) | m/s² |
| rotationRate | rotation speed (alpha, beta, gamma) | °/s |
| interval | time between two readings | ms |
What a site can't see
Motion sensors don't tell where you are: location goes through a different interface, with its own permission. They give neither sound, nor images, nor your contacts. A site can also cut itself off from these sensors with the Permissions-Policy header: GyroArcade opens them only to its own pages, and shuts off the camera, the microphone, location and payment.
Why the iPhone asks for permission
In 2019, researchers at the University of Cambridge showed that a site could recognize a phone from one visit to the next by reading the tiny calibration flaws of its sensors, without asking anything (SensorID, IEEE Symposium on Security and Privacy 2019). Apple responded with iOS 12.2 by turning this access off by default in Safari; since iOS 13, a page must ask for consent, after a user gesture. That's why Looping has you tap a button before reading anything.
What Looping keeps
Every throw is counted by the server: the sensor readings during the flight (a few seconds of accelerometer and gyroscope, with no location or sound) are sent to it, then forgotten. When it's a record, its trace (about 2 kB) is kept for 90 days to recompute the score against cheating; a refused throw may be kept for 30 days to fix the game. The details are in the legal notice.
Your turn to calculate
Try first, then unfold the answer. All the data is in the article.
1. A throw lasts 1.5 s, measured at 60 Hz. How many rotation-speed values does the game receive, all axes together?
Show the answer
60 × 1.5 = 90 readings per axis; three axes, so 270 rotation-speed values (and as many for acceleration).
2. A record's trace weighs about 2 kB. How many traces would fit in 1 GB?
Show the answer
1 GB = 1,000,000 kB (in SI units), so 1,000,000 ÷ 2 = 500,000 traces.
3. Between two readings at 60 Hz, through what angle does an iPhone 16 thrown at the 4,008 °/s ceiling turn?
Show the answer
Δt = 1/60 s ≈ 0.0167 s; θ = 4,008 × 0.0167 ≈ 67°. The game rebuilds the rotation from these 67° steps: it adds up speeds, it doesn't “see” an angle.
Sources
- W3C, DeviceOrientation and DeviceMotion Events (the specification for the sensors in the browser)
- MDN, DeviceMotionEvent (what a web page receives)
- Zhang, Beresford and Sheret, “SensorID: Sensor Calibration Fingerprinting for Smartphones”, IEEE S&P 2019 (University of Cambridge)
- Looping, legal notice and privacy