deviceEnums.js 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. /**
  2. * Enum for Device Types
  3. */
  4. export var DeviceType;
  5. (function (DeviceType) {
  6. /** Generic */
  7. DeviceType[DeviceType["Generic"] = 0] = "Generic";
  8. /** Keyboard */
  9. DeviceType[DeviceType["Keyboard"] = 1] = "Keyboard";
  10. /** Mouse */
  11. DeviceType[DeviceType["Mouse"] = 2] = "Mouse";
  12. /** Touch Pointers */
  13. DeviceType[DeviceType["Touch"] = 3] = "Touch";
  14. /** PS4 Dual Shock */
  15. DeviceType[DeviceType["DualShock"] = 4] = "DualShock";
  16. /** Xbox */
  17. DeviceType[DeviceType["Xbox"] = 5] = "Xbox";
  18. /** Switch Controller */
  19. DeviceType[DeviceType["Switch"] = 6] = "Switch";
  20. /** PS5 DualSense */
  21. DeviceType[DeviceType["DualSense"] = 7] = "DualSense";
  22. })(DeviceType || (DeviceType = {}));
  23. // Device Enums
  24. /**
  25. * Enum for All Pointers (Touch/Mouse)
  26. */
  27. export var PointerInput;
  28. (function (PointerInput) {
  29. /** Horizontal Axis (Not used in events/observables; only in polling) */
  30. PointerInput[PointerInput["Horizontal"] = 0] = "Horizontal";
  31. /** Vertical Axis (Not used in events/observables; only in polling) */
  32. PointerInput[PointerInput["Vertical"] = 1] = "Vertical";
  33. /** Left Click or Touch */
  34. PointerInput[PointerInput["LeftClick"] = 2] = "LeftClick";
  35. /** Middle Click */
  36. PointerInput[PointerInput["MiddleClick"] = 3] = "MiddleClick";
  37. /** Right Click */
  38. PointerInput[PointerInput["RightClick"] = 4] = "RightClick";
  39. /** Browser Back */
  40. PointerInput[PointerInput["BrowserBack"] = 5] = "BrowserBack";
  41. /** Browser Forward */
  42. PointerInput[PointerInput["BrowserForward"] = 6] = "BrowserForward";
  43. /** Mouse Wheel X */
  44. PointerInput[PointerInput["MouseWheelX"] = 7] = "MouseWheelX";
  45. /** Mouse Wheel Y */
  46. PointerInput[PointerInput["MouseWheelY"] = 8] = "MouseWheelY";
  47. /** Mouse Wheel Z */
  48. PointerInput[PointerInput["MouseWheelZ"] = 9] = "MouseWheelZ";
  49. /** Used in events/observables to identify if x/y changes occurred */
  50. PointerInput[PointerInput["Move"] = 12] = "Move";
  51. })(PointerInput || (PointerInput = {}));
  52. /** @internal */
  53. export var NativePointerInput;
  54. (function (NativePointerInput) {
  55. /** Horizontal Axis */
  56. NativePointerInput[NativePointerInput["Horizontal"] = 0] = "Horizontal";
  57. /** Vertical Axis */
  58. NativePointerInput[NativePointerInput["Vertical"] = 1] = "Vertical";
  59. /** Left Click or Touch */
  60. NativePointerInput[NativePointerInput["LeftClick"] = 2] = "LeftClick";
  61. /** Middle Click */
  62. NativePointerInput[NativePointerInput["MiddleClick"] = 3] = "MiddleClick";
  63. /** Right Click */
  64. NativePointerInput[NativePointerInput["RightClick"] = 4] = "RightClick";
  65. /** Browser Back */
  66. NativePointerInput[NativePointerInput["BrowserBack"] = 5] = "BrowserBack";
  67. /** Browser Forward */
  68. NativePointerInput[NativePointerInput["BrowserForward"] = 6] = "BrowserForward";
  69. /** Mouse Wheel X */
  70. NativePointerInput[NativePointerInput["MouseWheelX"] = 7] = "MouseWheelX";
  71. /** Mouse Wheel Y */
  72. NativePointerInput[NativePointerInput["MouseWheelY"] = 8] = "MouseWheelY";
  73. /** Mouse Wheel Z */
  74. NativePointerInput[NativePointerInput["MouseWheelZ"] = 9] = "MouseWheelZ";
  75. /** Delta X */
  76. NativePointerInput[NativePointerInput["DeltaHorizontal"] = 10] = "DeltaHorizontal";
  77. /** Delta Y */
  78. NativePointerInput[NativePointerInput["DeltaVertical"] = 11] = "DeltaVertical";
  79. })(NativePointerInput || (NativePointerInput = {}));
  80. /**
  81. * Enum for Dual Shock Gamepad
  82. */
  83. export var DualShockInput;
  84. (function (DualShockInput) {
  85. /** Cross */
  86. DualShockInput[DualShockInput["Cross"] = 0] = "Cross";
  87. /** Circle */
  88. DualShockInput[DualShockInput["Circle"] = 1] = "Circle";
  89. /** Square */
  90. DualShockInput[DualShockInput["Square"] = 2] = "Square";
  91. /** Triangle */
  92. DualShockInput[DualShockInput["Triangle"] = 3] = "Triangle";
  93. /** L1 */
  94. DualShockInput[DualShockInput["L1"] = 4] = "L1";
  95. /** R1 */
  96. DualShockInput[DualShockInput["R1"] = 5] = "R1";
  97. /** L2 */
  98. DualShockInput[DualShockInput["L2"] = 6] = "L2";
  99. /** R2 */
  100. DualShockInput[DualShockInput["R2"] = 7] = "R2";
  101. /** Share */
  102. DualShockInput[DualShockInput["Share"] = 8] = "Share";
  103. /** Options */
  104. DualShockInput[DualShockInput["Options"] = 9] = "Options";
  105. /** L3 */
  106. DualShockInput[DualShockInput["L3"] = 10] = "L3";
  107. /** R3 */
  108. DualShockInput[DualShockInput["R3"] = 11] = "R3";
  109. /** DPadUp */
  110. DualShockInput[DualShockInput["DPadUp"] = 12] = "DPadUp";
  111. /** DPadDown */
  112. DualShockInput[DualShockInput["DPadDown"] = 13] = "DPadDown";
  113. /** DPadLeft */
  114. DualShockInput[DualShockInput["DPadLeft"] = 14] = "DPadLeft";
  115. /** DRight */
  116. DualShockInput[DualShockInput["DPadRight"] = 15] = "DPadRight";
  117. /** Home */
  118. DualShockInput[DualShockInput["Home"] = 16] = "Home";
  119. /** TouchPad */
  120. DualShockInput[DualShockInput["TouchPad"] = 17] = "TouchPad";
  121. /** LStickXAxis */
  122. DualShockInput[DualShockInput["LStickXAxis"] = 18] = "LStickXAxis";
  123. /** LStickYAxis */
  124. DualShockInput[DualShockInput["LStickYAxis"] = 19] = "LStickYAxis";
  125. /** RStickXAxis */
  126. DualShockInput[DualShockInput["RStickXAxis"] = 20] = "RStickXAxis";
  127. /** RStickYAxis */
  128. DualShockInput[DualShockInput["RStickYAxis"] = 21] = "RStickYAxis";
  129. })(DualShockInput || (DualShockInput = {}));
  130. /**
  131. * Enum for Dual Sense Gamepad
  132. */
  133. export var DualSenseInput;
  134. (function (DualSenseInput) {
  135. /** Cross */
  136. DualSenseInput[DualSenseInput["Cross"] = 0] = "Cross";
  137. /** Circle */
  138. DualSenseInput[DualSenseInput["Circle"] = 1] = "Circle";
  139. /** Square */
  140. DualSenseInput[DualSenseInput["Square"] = 2] = "Square";
  141. /** Triangle */
  142. DualSenseInput[DualSenseInput["Triangle"] = 3] = "Triangle";
  143. /** L1 */
  144. DualSenseInput[DualSenseInput["L1"] = 4] = "L1";
  145. /** R1 */
  146. DualSenseInput[DualSenseInput["R1"] = 5] = "R1";
  147. /** L2 */
  148. DualSenseInput[DualSenseInput["L2"] = 6] = "L2";
  149. /** R2 */
  150. DualSenseInput[DualSenseInput["R2"] = 7] = "R2";
  151. /** Create */
  152. DualSenseInput[DualSenseInput["Create"] = 8] = "Create";
  153. /** Options */
  154. DualSenseInput[DualSenseInput["Options"] = 9] = "Options";
  155. /** L3 */
  156. DualSenseInput[DualSenseInput["L3"] = 10] = "L3";
  157. /** R3 */
  158. DualSenseInput[DualSenseInput["R3"] = 11] = "R3";
  159. /** DPadUp */
  160. DualSenseInput[DualSenseInput["DPadUp"] = 12] = "DPadUp";
  161. /** DPadDown */
  162. DualSenseInput[DualSenseInput["DPadDown"] = 13] = "DPadDown";
  163. /** DPadLeft */
  164. DualSenseInput[DualSenseInput["DPadLeft"] = 14] = "DPadLeft";
  165. /** DRight */
  166. DualSenseInput[DualSenseInput["DPadRight"] = 15] = "DPadRight";
  167. /** Home */
  168. DualSenseInput[DualSenseInput["Home"] = 16] = "Home";
  169. /** TouchPad */
  170. DualSenseInput[DualSenseInput["TouchPad"] = 17] = "TouchPad";
  171. /** LStickXAxis */
  172. DualSenseInput[DualSenseInput["LStickXAxis"] = 18] = "LStickXAxis";
  173. /** LStickYAxis */
  174. DualSenseInput[DualSenseInput["LStickYAxis"] = 19] = "LStickYAxis";
  175. /** RStickXAxis */
  176. DualSenseInput[DualSenseInput["RStickXAxis"] = 20] = "RStickXAxis";
  177. /** RStickYAxis */
  178. DualSenseInput[DualSenseInput["RStickYAxis"] = 21] = "RStickYAxis";
  179. })(DualSenseInput || (DualSenseInput = {}));
  180. /**
  181. * Enum for Xbox Gamepad
  182. */
  183. export var XboxInput;
  184. (function (XboxInput) {
  185. /** A */
  186. XboxInput[XboxInput["A"] = 0] = "A";
  187. /** B */
  188. XboxInput[XboxInput["B"] = 1] = "B";
  189. /** X */
  190. XboxInput[XboxInput["X"] = 2] = "X";
  191. /** Y */
  192. XboxInput[XboxInput["Y"] = 3] = "Y";
  193. /** LB */
  194. XboxInput[XboxInput["LB"] = 4] = "LB";
  195. /** RB */
  196. XboxInput[XboxInput["RB"] = 5] = "RB";
  197. /** LT */
  198. XboxInput[XboxInput["LT"] = 6] = "LT";
  199. /** RT */
  200. XboxInput[XboxInput["RT"] = 7] = "RT";
  201. /** Back */
  202. XboxInput[XboxInput["Back"] = 8] = "Back";
  203. /** Start */
  204. XboxInput[XboxInput["Start"] = 9] = "Start";
  205. /** LS */
  206. XboxInput[XboxInput["LS"] = 10] = "LS";
  207. /** RS */
  208. XboxInput[XboxInput["RS"] = 11] = "RS";
  209. /** DPadUp */
  210. XboxInput[XboxInput["DPadUp"] = 12] = "DPadUp";
  211. /** DPadDown */
  212. XboxInput[XboxInput["DPadDown"] = 13] = "DPadDown";
  213. /** DPadLeft */
  214. XboxInput[XboxInput["DPadLeft"] = 14] = "DPadLeft";
  215. /** DRight */
  216. XboxInput[XboxInput["DPadRight"] = 15] = "DPadRight";
  217. /** Home */
  218. XboxInput[XboxInput["Home"] = 16] = "Home";
  219. /** LStickXAxis */
  220. XboxInput[XboxInput["LStickXAxis"] = 17] = "LStickXAxis";
  221. /** LStickYAxis */
  222. XboxInput[XboxInput["LStickYAxis"] = 18] = "LStickYAxis";
  223. /** RStickXAxis */
  224. XboxInput[XboxInput["RStickXAxis"] = 19] = "RStickXAxis";
  225. /** RStickYAxis */
  226. XboxInput[XboxInput["RStickYAxis"] = 20] = "RStickYAxis";
  227. })(XboxInput || (XboxInput = {}));
  228. /**
  229. * Enum for Switch (Pro/JoyCon L+R) Gamepad
  230. */
  231. export var SwitchInput;
  232. (function (SwitchInput) {
  233. /** B */
  234. SwitchInput[SwitchInput["B"] = 0] = "B";
  235. /** A */
  236. SwitchInput[SwitchInput["A"] = 1] = "A";
  237. /** Y */
  238. SwitchInput[SwitchInput["Y"] = 2] = "Y";
  239. /** X */
  240. SwitchInput[SwitchInput["X"] = 3] = "X";
  241. /** L */
  242. SwitchInput[SwitchInput["L"] = 4] = "L";
  243. /** R */
  244. SwitchInput[SwitchInput["R"] = 5] = "R";
  245. /** ZL */
  246. SwitchInput[SwitchInput["ZL"] = 6] = "ZL";
  247. /** ZR */
  248. SwitchInput[SwitchInput["ZR"] = 7] = "ZR";
  249. /** Minus */
  250. SwitchInput[SwitchInput["Minus"] = 8] = "Minus";
  251. /** Plus */
  252. SwitchInput[SwitchInput["Plus"] = 9] = "Plus";
  253. /** LS */
  254. SwitchInput[SwitchInput["LS"] = 10] = "LS";
  255. /** RS */
  256. SwitchInput[SwitchInput["RS"] = 11] = "RS";
  257. /** DPadUp */
  258. SwitchInput[SwitchInput["DPadUp"] = 12] = "DPadUp";
  259. /** DPadDown */
  260. SwitchInput[SwitchInput["DPadDown"] = 13] = "DPadDown";
  261. /** DPadLeft */
  262. SwitchInput[SwitchInput["DPadLeft"] = 14] = "DPadLeft";
  263. /** DRight */
  264. SwitchInput[SwitchInput["DPadRight"] = 15] = "DPadRight";
  265. /** Home */
  266. SwitchInput[SwitchInput["Home"] = 16] = "Home";
  267. /** Capture */
  268. SwitchInput[SwitchInput["Capture"] = 17] = "Capture";
  269. /** LStickXAxis */
  270. SwitchInput[SwitchInput["LStickXAxis"] = 18] = "LStickXAxis";
  271. /** LStickYAxis */
  272. SwitchInput[SwitchInput["LStickYAxis"] = 19] = "LStickYAxis";
  273. /** RStickXAxis */
  274. SwitchInput[SwitchInput["RStickXAxis"] = 20] = "RStickXAxis";
  275. /** RStickYAxis */
  276. SwitchInput[SwitchInput["RStickYAxis"] = 21] = "RStickYAxis";
  277. })(SwitchInput || (SwitchInput = {}));
  278. //# sourceMappingURL=deviceEnums.js.map