+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
new MarioAccelerometer()
+ + +-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Source: +
-
+
-
+
- + devices/marioaccelerometer.js, + line 25 + +
+
+
+
+
+
+
+
+
Extends
+ + + + +-
+
- Device +
Members
+ +-
+
+
-
+
<readonly> connected
+ + +
+ -
+
+
+
+
+
+
-
+
+
+
- Inherited From: +
-
+
-
+
- + Device#connected + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source: +
-
+
-
+
- + devices/device.js, + line 75 + +
+
+
+
+
+
+
+
+
Properties:
+ +-
+
+
+ +
++ + + + + + + +Name + + +Type + + + + + +Description ++ + + + + + + + +connected
+ + +boolean + + + + + + + + + + + +Check if the device is still attached.
+
+
+
+ -
+
<readonly> hub
+ + +
+ -
+
+
+
+
+
+
-
+
+
+
- Inherited From: +
-
+
-
+
- + Device#hub + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source: +
-
+
-
+
- + devices/device.js, + line 82 + +
+
+
+
+
+
+
+
+
Properties:
+ +-
+
+
+ +
++ + + + + + + +Name + + +Type + + + + + +Description ++ + + + + + + + +hub
+ + +Hub + + + + + + + + + + + +The Hub the device is attached to.
+
+
+
+ -
+
<readonly> isVirtualPort
+ + +
+ -
+
+
+
+
+
+
-
+
+
+
- Inherited From: +
-
+
-
+
- + Device#isVirtualPort + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source: +
-
+
-
+
- + devices/device.js, + line 119 + +
+
+
+
+
+
+
+
+
Properties:
+ +-
+
+
+ +
++ + + + + + + +Name + + +Type + + + + + +Description ++ + + + + + + + +isVirtualPort
+ + +boolean + + + + + + + + + + + +Is this device attached to a virtual port (ie. a combined device)
+
+
+
+ -
+
<readonly> mode
+ + +
+ -
+
+
+
+
+
+
-
+
+
+
- Inherited From: +
-
+
-
+
- + Device#mode + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source: +
-
+
-
+
- + devices/device.js, + line 109 + +
+
+
+
+
+
+
+
+
Properties:
+ +-
+
+
+ +
++ + + + + + + +Name + + +Type + + + + + +Description ++ + + + + + + + +mode
+ + +number + + + + + + + + + + + +The mode the device is currently in
+
+
+
+ -
+
<readonly> portName
+ + +
+ -
+
+
+
+
+
+
-
+
+
+
- Inherited From: +
-
+
-
+
- + Device#portName + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source: +
-
+
-
+
- + devices/device.js, + line 92 + +
+
+
+
+
+
+
+
+
Properties:
+ +-
+
+
+ +
++ + + + + + + +Name + + +Type + + + + + +Description ++ + + + + + + + +portName
+ + +string + + + + + + + + + + + +The port the device is attached to.
+
+
+
+ -
+
<readonly> type
+ + +
+ -
+
+
+
+
+
+
-
+
+
+
- Inherited From: +
-
+
-
+
- + Device#type + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source: +
-
+
-
+
- + devices/device.js, + line 99 + +
+
+
+
+
+
+
+
+
Properties:
+ +-
+
+
+ +
++ + + + + + + +Name + + +Type + + + + + +Description ++ + + + + + + + +type
+ + +number + + + + + + + + + + + +The type of the device
+
+
+
+
+
+
+
+
Events
+ +-
+
+
-
+
accel
+ + +
+ -
+
+
+ ++ + + + + +
Emits when accelerometer detects movement. Measured in mG.
+Type: +object + + +
+ + + + +Parameters:
+ + ++ +
+ + + + ++ + + + + + + +Name + + +Type + + + + + +Description ++ + + + + + + + +x
+ + +number + + + + + + + + + + ++ + + + + + + + + +y
+ + +number + + + + + + + + + + ++ + + + + + + + + +z
+ + +number + + + + + + + + + + ++ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Source: +
-
+
-
+
- + devices/marioaccelerometer.js, + line 37 + +
+
+
+
+
+
+
+
+
+
+
+
+ -
+
gest
+ + +
+ -
+
+
+ ++ + + + + +
Emits when a gesture is detected
+Type: +object + + +
+ + + + +Parameters:
+ + ++ +
+ + + + ++ + + + + + + +Name + + +Type + + + + + +Description ++ + + + + + + + +gesture
+ + +number + + + + + + + + + + ++ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Source: +
-
+
-
+
- + devices/marioaccelerometer.js, + line 51 + +
+
+
+
+
+
+
+
+
+
+
+
+