startGyroscope 陀螺仪监听

startGyroscope ^6.8

陀螺仪监听

#请求参数

  • N/A

#接口调用示例

    this.$bridge
    .startGyroscope()
    .then(res => {    
        this.$alert(res)
    })
    .catch(err => {
        this.$toast(err)
    })

#返回参数

  • 成功时返回
Prop Type Comment
code Number 0
x Number x 轴的角速度
y Number y 轴的角速度
z Number z 轴的角速度
  • 失败时返回(api为空或者没有)
Prop Type Value
code Number -1
msg String 失败
Prop Type Value
code Number -8
msg String 不支持

#返回示例

{
    "code": 0,
    "x": 0.2082139253616333,
    "y": 0.107050821185112,
    "z": 0.04517493396997452
}
posted on 2024-12-16 09:42  AtlasLapetos  阅读(12)  评论(0)    收藏  举报