/
Accelerometer.cljs
50 lines (34 loc) · 1.24 KB
/
Accelerometer.cljs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
(ns web.accelerometer.Accelerometer
"The Accelerometer interface of the Sensor APIs provides on each
the acceleration applied to the device along all three axes."
(:refer-clojure :exclude []))
(defn x
"Property.
[Read Only]
The x read-only property of the `web.accelerometer.Accelerometer`
returns a double precision integer containing the acceleration
the device along the its x axis.
`var xAcceleration = accelerometer.x`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Accelerometer/x`"
[this]
(-> this (.-x)))
(defn y
"Property.
[Read Only]
The y read-only property of the `web.accelerometer.Accelerometer`
returns a double precision integer containing the acceleration
the device along the its y axis.
`var yAcceleration = accelerometer.y`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Accelerometer/y`"
[this]
(-> this (.-y)))
(defn z
"Property.
[Read Only]
The z read-only property of the `web.accelerometer.Accelerometer`
returns a double precision integer containing the acceleration
the device along the its z axis.
`var zAcceleration = accelerometer.z`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Accelerometer/z`"
[this]
(-> this (.-z)))