是否可以使用Javascript访问iPhone加速度计? [英] Is there access to the iPhone accelerometer using Javascript?

查看:82
本文介绍了是否可以使用Javascript访问iPhone加速度计?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始尝试为我的iPhone以及我的朋友拥有的其他支持网络的手机做一些基于网络的游戏编程,并且很难在浏览器中查找使用Javascript访问加速度计的信息。

I'm starting to try and do some web based game programming for my iPhone, and other web enabled phones that my friends have, and was having a hard time finding information on accessing the accelerometer using Javascript in the browser.

在最新版本中,我知道我现在可以访问位置信息,但我希望我可以在我计划的一些游戏中使用加速度计制作。

With the latest release, I know I've got access to location information now but I was hoping that I could make use of the accelerometer for some of the games I plan on making.

或者,这也适用于Android手机吗?

Alternately, is this also possible with the Android phones?

推荐答案

在最新的iOS更新(4.2)中,现在可以从Javascript访问加速度计。

In the latest iOS update (4.2) the accelorometer is now accessible from Javascript.

请参阅: http://www.mobilexweb.com/blog/safari-ios-accelerometer-websockets-html5

这篇关于是否可以使用Javascript访问iPhone加速度计?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆