TianQian

请教大佬们一个问题,如何在 H5 获取设备根据正北的偏移角度

  •  
  •   TianQian · Mar 17, 2023 · 1588 views
    This topic created in 1223 days ago, the information mentioned may be changed or developed.

    目前已知可以通过 DeviceOrientationEvent 获取设备的三维的旋转角度

    其中 DeviceOrientationEvent.alpha 就是 Z 轴的偏移角度

    但是问题来了,alpha 并不是绝对值,iOS 可以根据 DeviceOrientationEvent.webkitCompassHeading 取得绝对值,安卓是有什么办法吗...

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2908 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 15:08 · PVG 23:08 · LAX 08:08 · JFK 11:08
    ♥ Do have faith in what you're doing.