我正在考虑使用移动设备移动来平移Google Sphere,类似于Google Cardboard正在做的事情,但是在webapp中。你知道的任何图书馆?我找不到坚实的东西。
答案 0 :(得分:0)
Mozilla has good documentation about Detecting device orientation
https://developer.mozilla.org/en-US/docs/Web/API/Detecting_device_orientation
It's pretty basic and easy to use.
For your idea you would basically want to have the image of your Sphere inside a relative div with overflow hidden, and make the image move absolutely according to the tilting/accelerating of your device.