TianQian

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

  •  
  •   TianQian · Mar 17, 2023 · 1486 views
    This topic created in 1177 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   ·   3006 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 07:11 · PVG 15:11 · LAX 00:11 · JFK 03:11
    ♥ Do have faith in what you're doing.