TianQian

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

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