equal
deleted
inserted
replaced
|
1 /** |
|
2 * This class contains acceleration information |
|
3 * @constructor |
|
4 * @param {Number} x The force applied by the device in the x-axis. |
|
5 * @param {Number} y The force applied by the device in the y-axis. |
|
6 * @param {Number} z The force applied by the device in the z-axis. |
|
7 */ |
|
8 function Acceleration(x, y, z) { |
|
9 /** |
|
10 * The force applied by the device in the x-axis. |
|
11 */ |
|
12 this.x = x; |
|
13 /** |
|
14 * The force applied by the device in the y-axis. |
|
15 */ |
|
16 this.y = y; |
|
17 /** |
|
18 * The force applied by the device in the z-axis. |
|
19 */ |
|
20 this.z = z; |
|
21 /** |
|
22 * The time that the acceleration was obtained. |
|
23 */ |
|
24 this.timestamp = new Date().getTime(); |
|
25 } |
|
26 |
|
27 /** |
|
28 * This class specifies the options for requesting acceleration data. |
|
29 * @constructor |
|
30 */ |
|
31 function AccelerationOptions() { |
|
32 /** |
|
33 * The timeout after which if acceleration data cannot be obtained the errorCallback |
|
34 * is called. |
|
35 */ |
|
36 this.timeout = 10000; |
|
37 } |