HTML5 provides an advanced Web user experience with modern device sensors
Source: Internet
Author: User
KeywordsUser experience sensors HTML5 modern equipment
Today, we published the prototype implementation of the Deviceorientation event specification draft on Http://www.aliyun.com/zixun/aggregation/79228.html > Html5labs.com. This specification defines a new DOM event that provides the physical orientation and movement-related information of the device. Such APIs will allow web developers to easily provide an advanced Web user experience with sensors from modern devices.
Developer Benefits
With the device direction API, developers can explore new input mechanisms for the game, new gestures for applications (such as "shaking to clear the screen" or "tilt to zoom") or even magnifying the actual experience. The prototype installation includes a sample game to help you get started with the API.
This video describes the concept in dynamic form for the introduction of this 250.html > post.
How to Work
The device direction API exposes two different types of sensor data: direction and motion.
When the physical direction of the device changes (for example, the user tilts or rotates the device), the Deviceorientation event is triggered in the window, and the alpha, beta, and gamma angles of rotation are provided (in degrees):
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.