【函数】 | void start(int zAngle, int upKeycode, int downKeycode, int leftKeycode, int rightKeycode) |
【函数】 | void start(String rate, int cycle, int accuracy, int zAngle, int upKeycode, int downKeycode, int leftKeycode, int rightKeycode) |
【说明】 | 启动方向传感器,在方向发生变化时向浏览器发送按键,如果需要回调函数,请使用rexseeOrientation对象。 |
【返回】 | 无 |
【参数】 |
rate:方向传感器的响应速度,“fastest”,“game”,“ui”或“normal”,默认为“fastest”。
cycle:方向变化的检查周期,毫秒数,默认为100。 accuracy:方向变化的精度,默认为10度。 zAngle:作为基准平面的Z方向角度,大于该角度认为是向下倾斜,小于该角度认为是向上倾斜。 upKeycode:手机向上倾斜时发送的按键(Android按键代码)。 downKeycode:手机下右倾斜时发送的按键(Android按键代码)。 leftKeycode:手机向左倾斜时发送的按键(Android按键代码)。 rightKeycode:手机向右倾斜时发送的按键(Android按键代码)。 |
【示例】 | 无 |
【函数】 | void stop() |
【说明】 | 停止方向传感器。 |
【返回】 | 无 |
【参数】 | 无 |
【示例】 | 无 |