Presentation is loading. Please wait.

Presentation is loading. Please wait.

API for Mobile Devices.

Similar presentations


Presentation on theme: "API for Mobile Devices."— Presentation transcript:

1 API for Mobile Devices

2 Outline Device orientation events Device motion events
[Screen orientation] Touch event interface

3 Coordinate Frames (url)
Earth Coordinate Frame (XYZ) The X axis follows along the ground plane, perpendicular to the Y axis and positive toward the east (and therefore negative toward the west). The Y axis follows along the ground plane, and is positive toward true north (that is, the North Pole, not magnetic north) and negative toward true south. The Z axis is perpendicular to the ground plane; think of it as a line drawn between the device and the center of the Earth. The value of the Z coordinate is positive upward (away from the center of the Earth) and negative downward (toward the center of the Earth). The device coordinate frame (xyz) is the coordination frame fixed on the center of the device.  The x axis is in the plane of the screen and is positive toward the right and negative toward the left. The y axis is in the plane of the screen and is positive toward the top and negative toward the bottom. The z axis is perpendicular to the screen or keyboard, and is positive extending outward from the screen.

4 Rotation Rotation is described about any given axis in terms of the number of degrees of difference between the device's coordinate frame and the Earth coordinate frame, and is measured in degrees. [0,360) [-180,180) [-90,90)

5 Detecting Device Events (url)

6 Tilt Table Prototype

7 Application: 360 video/photo (as in Facebook 360)

8 Touch Event (url) TouchEvent.touches:
An array, representing all current points of contact with the surface Event types: touchstart touched touchmove

9 Touch Object (url)

10 XZ Tracer (single touch point)

11 Demo (url)

12 Touch Piano (multiple touch point)
MouseDown (NoteOn), MouseUp (NoteOff)


Download ppt "API for Mobile Devices."

Similar presentations


Ads by Google