The thing that troubles me is that the same codebase runs differently after publishing it.
I am printing now the gyro (beta and gamma) angles (bottom left of screen), so you can have a look.
The window.ondevicemotion event doesn't return anything. Tried to implemented a generic framework like gyro.js but the result is the same. It doesn't work on the published version.
From inside the editor hitting Play:
Directly accessing the published version (tried both http and https):