September 2012
Intermediate to advanced
552 pages
14h 48m
English
Using the orientation of your mobile device to control a game was one of the first “wow” moments of the smartphone gaming era. With the support for device orientation and acceleration in the browser, that capability is now within your reach as an HTML5 game developer. This chapter examines the DeviceOrientation event API, which has two useful events: device orientation and device motion. A third event, compass, is also available, but unless you have a long-running application that needs precise direction details, you can safely ignore this event.
Read now
Unlock full access