@multitapio/multitap 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (286) hide show
  1. package/dist/.stamp +0 -0
  2. package/dist/cache.d.ts +117 -0
  3. package/dist/cache.d.ts.map +1 -0
  4. package/dist/channel.d.ts +91 -0
  5. package/dist/channel.d.ts.map +1 -0
  6. package/dist/channel.worker.d.ts +3 -0
  7. package/dist/channel.worker.d.ts.map +1 -0
  8. package/dist/codegen/config.d.ts +107 -0
  9. package/dist/codegen/config.d.ts.map +1 -0
  10. package/dist/codegen/generator.d.ts +78 -0
  11. package/dist/codegen/generator.d.ts.map +1 -0
  12. package/dist/codegen/index.d.ts +13 -0
  13. package/dist/codegen/index.d.ts.map +1 -0
  14. package/dist/codegen/inject.d.ts +51 -0
  15. package/dist/codegen/inject.d.ts.map +1 -0
  16. package/dist/codegen/rust.d.ts +22 -0
  17. package/dist/codegen/rust.d.ts.map +1 -0
  18. package/dist/codegen/typescript.d.ts +22 -0
  19. package/dist/codegen/typescript.d.ts.map +1 -0
  20. package/dist/constants.d.ts +5 -0
  21. package/dist/constants.d.ts.map +1 -0
  22. package/dist/crypto.d.ts +141 -0
  23. package/dist/crypto.d.ts.map +1 -0
  24. package/dist/debug.d.ts +39 -0
  25. package/dist/debug.d.ts.map +1 -0
  26. package/dist/diagnostics/index.d.ts +12 -0
  27. package/dist/diagnostics/index.d.ts.map +1 -0
  28. package/dist/diagnostics.js +5502 -0
  29. package/dist/e2e/cli.d.ts +2 -0
  30. package/dist/e2e/cli.d.ts.map +1 -0
  31. package/dist/executor.d.ts +130 -0
  32. package/dist/executor.d.ts.map +1 -0
  33. package/dist/globals.d.ts +32 -0
  34. package/dist/helpers.d.ts +3 -0
  35. package/dist/helpers.d.ts.map +1 -0
  36. package/dist/input-codec.d.ts +136 -0
  37. package/dist/input-codec.d.ts.map +1 -0
  38. package/dist/input-graph.d.ts +106 -0
  39. package/dist/input-graph.d.ts.map +1 -0
  40. package/dist/lib.d.ts +10 -0
  41. package/dist/lib.d.ts.map +1 -0
  42. package/dist/lib.js +9409 -0
  43. package/dist/messages.d.ts +63 -0
  44. package/dist/messages.d.ts.map +1 -0
  45. package/dist/peer-mesh.d.ts +77 -0
  46. package/dist/peer-mesh.d.ts.map +1 -0
  47. package/dist/react/Crosshair.d.ts +17 -0
  48. package/dist/react/Crosshair.d.ts.map +1 -0
  49. package/dist/react/Player.d.ts +10 -0
  50. package/dist/react/Player.d.ts.map +1 -0
  51. package/dist/react/PlayerPoseContext.d.ts +31 -0
  52. package/dist/react/PlayerPoseContext.d.ts.map +1 -0
  53. package/dist/react/hooks/index.d.ts +7 -0
  54. package/dist/react/hooks/index.d.ts.map +1 -0
  55. package/dist/react/hooks/useEvent.d.ts +46 -0
  56. package/dist/react/hooks/useEvent.d.ts.map +1 -0
  57. package/dist/react/hooks/useFrame.d.ts +23 -0
  58. package/dist/react/hooks/useFrame.d.ts.map +1 -0
  59. package/dist/react/hooks/usePlayers.d.ts +24 -0
  60. package/dist/react/hooks/usePlayers.d.ts.map +1 -0
  61. package/dist/react/hooks/useQuery.d.ts +41 -0
  62. package/dist/react/hooks/useQuery.d.ts.map +1 -0
  63. package/dist/react/hooks/useSession.d.ts +10 -0
  64. package/dist/react/hooks/useSession.d.ts.map +1 -0
  65. package/dist/react/index.d.ts +18 -0
  66. package/dist/react/index.d.ts.map +1 -0
  67. package/dist/react/input/DesktopInputMapper.d.ts +38 -0
  68. package/dist/react/input/DesktopInputMapper.d.ts.map +1 -0
  69. package/dist/react/input/index.d.ts +4 -0
  70. package/dist/react/input/index.d.ts.map +1 -0
  71. package/dist/react/input/types.d.ts +46 -0
  72. package/dist/react/input/types.d.ts.map +1 -0
  73. package/dist/react/providers/SessionProvider.d.ts +17 -0
  74. package/dist/react/providers/SessionProvider.d.ts.map +1 -0
  75. package/dist/react/providers/index.d.ts +2 -0
  76. package/dist/react/providers/index.d.ts.map +1 -0
  77. package/dist/react/types/index.d.ts +2 -0
  78. package/dist/react/types/index.d.ts.map +1 -0
  79. package/dist/react/types/session.d.ts +88 -0
  80. package/dist/react/types/session.d.ts.map +1 -0
  81. package/dist/react/types.d.ts +134 -0
  82. package/dist/react/types.d.ts.map +1 -0
  83. package/dist/react/utils/math.d.ts +19 -0
  84. package/dist/react/utils/math.d.ts.map +1 -0
  85. package/dist/react/views/AsteroidsView.d.ts +24 -0
  86. package/dist/react/views/AsteroidsView.d.ts.map +1 -0
  87. package/dist/react/views/FirstPersonView.d.ts +10 -0
  88. package/dist/react/views/FirstPersonView.d.ts.map +1 -0
  89. package/dist/react/views/IsometricView.d.ts +21 -0
  90. package/dist/react/views/IsometricView.d.ts.map +1 -0
  91. package/dist/react/views/MapView.d.ts +16 -0
  92. package/dist/react/views/MapView.d.ts.map +1 -0
  93. package/dist/react/views/MobaView.d.ts +17 -0
  94. package/dist/react/views/MobaView.d.ts.map +1 -0
  95. package/dist/react/views/SideOnView.d.ts +23 -0
  96. package/dist/react/views/SideOnView.d.ts.map +1 -0
  97. package/dist/react/views/ThirdPersonFixedView.d.ts +21 -0
  98. package/dist/react/views/ThirdPersonFixedView.d.ts.map +1 -0
  99. package/dist/react/views/ThirdPersonView.d.ts +12 -0
  100. package/dist/react/views/ThirdPersonView.d.ts.map +1 -0
  101. package/dist/react/views/TopDownFixedView.d.ts +20 -0
  102. package/dist/react/views/TopDownFixedView.d.ts.map +1 -0
  103. package/dist/react/views/TopDownView.d.ts +12 -0
  104. package/dist/react/views/TopDownView.d.ts.map +1 -0
  105. package/dist/react/views/TwinStickView.d.ts +13 -0
  106. package/dist/react/views/TwinStickView.d.ts.map +1 -0
  107. package/dist/react/views/VehicleFixedView.d.ts +16 -0
  108. package/dist/react/views/VehicleFixedView.d.ts.map +1 -0
  109. package/dist/react/views/VehicleView.d.ts +13 -0
  110. package/dist/react/views/VehicleView.d.ts.map +1 -0
  111. package/dist/react/views/index.d.ts +21 -0
  112. package/dist/react/views/index.d.ts.map +1 -0
  113. package/dist/react/views/types.d.ts +136 -0
  114. package/dist/react/views/types.d.ts.map +1 -0
  115. package/dist/rollback.d.ts +193 -0
  116. package/dist/rollback.d.ts.map +1 -0
  117. package/dist/rollback.worker.d.ts +3 -0
  118. package/dist/rollback.worker.d.ts.map +1 -0
  119. package/dist/schema.d.ts +309 -0
  120. package/dist/schema.d.ts.map +1 -0
  121. package/dist/session-config.d.ts +119 -0
  122. package/dist/session-config.d.ts.map +1 -0
  123. package/dist/session.d.ts +120 -0
  124. package/dist/session.d.ts.map +1 -0
  125. package/dist/state.d.ts +400 -0
  126. package/dist/state.d.ts.map +1 -0
  127. package/dist/stats.d.ts +21 -0
  128. package/dist/stats.d.ts.map +1 -0
  129. package/dist/test-session.d.ts +170 -0
  130. package/dist/test-session.d.ts.map +1 -0
  131. package/dist/types/cache.d.ts +117 -0
  132. package/dist/types/cache.d.ts.map +1 -0
  133. package/dist/types/channel.d.ts +91 -0
  134. package/dist/types/channel.d.ts.map +1 -0
  135. package/dist/types/channel.worker.d.ts +3 -0
  136. package/dist/types/channel.worker.d.ts.map +1 -0
  137. package/dist/types/codegen/config.d.ts +107 -0
  138. package/dist/types/codegen/config.d.ts.map +1 -0
  139. package/dist/types/codegen/generator.d.ts +78 -0
  140. package/dist/types/codegen/generator.d.ts.map +1 -0
  141. package/dist/types/codegen/index.d.ts +13 -0
  142. package/dist/types/codegen/index.d.ts.map +1 -0
  143. package/dist/types/codegen/inject.d.ts +51 -0
  144. package/dist/types/codegen/inject.d.ts.map +1 -0
  145. package/dist/types/codegen/rust.d.ts +22 -0
  146. package/dist/types/codegen/rust.d.ts.map +1 -0
  147. package/dist/types/codegen/typescript.d.ts +22 -0
  148. package/dist/types/codegen/typescript.d.ts.map +1 -0
  149. package/dist/types/constants.d.ts +5 -0
  150. package/dist/types/constants.d.ts.map +1 -0
  151. package/dist/types/crypto.d.ts +141 -0
  152. package/dist/types/crypto.d.ts.map +1 -0
  153. package/dist/types/debug.d.ts +39 -0
  154. package/dist/types/debug.d.ts.map +1 -0
  155. package/dist/types/diagnostics/index.d.ts +12 -0
  156. package/dist/types/diagnostics/index.d.ts.map +1 -0
  157. package/dist/types/e2e/cli.d.ts +2 -0
  158. package/dist/types/e2e/cli.d.ts.map +1 -0
  159. package/dist/types/executor.d.ts +130 -0
  160. package/dist/types/executor.d.ts.map +1 -0
  161. package/dist/types/helpers.d.ts +3 -0
  162. package/dist/types/helpers.d.ts.map +1 -0
  163. package/dist/types/input-codec.d.ts +136 -0
  164. package/dist/types/input-codec.d.ts.map +1 -0
  165. package/dist/types/input-graph.d.ts +106 -0
  166. package/dist/types/input-graph.d.ts.map +1 -0
  167. package/dist/types/lib.d.ts +10 -0
  168. package/dist/types/lib.d.ts.map +1 -0
  169. package/dist/types/messages.d.ts +63 -0
  170. package/dist/types/messages.d.ts.map +1 -0
  171. package/dist/types/peer-mesh.d.ts +77 -0
  172. package/dist/types/peer-mesh.d.ts.map +1 -0
  173. package/dist/types/react/Crosshair.d.ts +17 -0
  174. package/dist/types/react/Crosshair.d.ts.map +1 -0
  175. package/dist/types/react/Player.d.ts +10 -0
  176. package/dist/types/react/Player.d.ts.map +1 -0
  177. package/dist/types/react/PlayerPoseContext.d.ts +31 -0
  178. package/dist/types/react/PlayerPoseContext.d.ts.map +1 -0
  179. package/dist/types/react/hooks/index.d.ts +7 -0
  180. package/dist/types/react/hooks/index.d.ts.map +1 -0
  181. package/dist/types/react/hooks/useEvent.d.ts +46 -0
  182. package/dist/types/react/hooks/useEvent.d.ts.map +1 -0
  183. package/dist/types/react/hooks/useFrame.d.ts +23 -0
  184. package/dist/types/react/hooks/useFrame.d.ts.map +1 -0
  185. package/dist/types/react/hooks/usePlayers.d.ts +24 -0
  186. package/dist/types/react/hooks/usePlayers.d.ts.map +1 -0
  187. package/dist/types/react/hooks/useQuery.d.ts +41 -0
  188. package/dist/types/react/hooks/useQuery.d.ts.map +1 -0
  189. package/dist/types/react/hooks/useSession.d.ts +10 -0
  190. package/dist/types/react/hooks/useSession.d.ts.map +1 -0
  191. package/dist/types/react/index.d.ts +18 -0
  192. package/dist/types/react/index.d.ts.map +1 -0
  193. package/dist/types/react/input/DesktopInputMapper.d.ts +38 -0
  194. package/dist/types/react/input/DesktopInputMapper.d.ts.map +1 -0
  195. package/dist/types/react/input/index.d.ts +4 -0
  196. package/dist/types/react/input/index.d.ts.map +1 -0
  197. package/dist/types/react/input/types.d.ts +46 -0
  198. package/dist/types/react/input/types.d.ts.map +1 -0
  199. package/dist/types/react/providers/SessionProvider.d.ts +17 -0
  200. package/dist/types/react/providers/SessionProvider.d.ts.map +1 -0
  201. package/dist/types/react/providers/index.d.ts +2 -0
  202. package/dist/types/react/providers/index.d.ts.map +1 -0
  203. package/dist/types/react/types/index.d.ts +2 -0
  204. package/dist/types/react/types/index.d.ts.map +1 -0
  205. package/dist/types/react/types/session.d.ts +88 -0
  206. package/dist/types/react/types/session.d.ts.map +1 -0
  207. package/dist/types/react/types.d.ts +134 -0
  208. package/dist/types/react/types.d.ts.map +1 -0
  209. package/dist/types/react/utils/math.d.ts +19 -0
  210. package/dist/types/react/utils/math.d.ts.map +1 -0
  211. package/dist/types/react/views/AsteroidsView.d.ts +24 -0
  212. package/dist/types/react/views/AsteroidsView.d.ts.map +1 -0
  213. package/dist/types/react/views/FirstPersonView.d.ts +10 -0
  214. package/dist/types/react/views/FirstPersonView.d.ts.map +1 -0
  215. package/dist/types/react/views/IsometricView.d.ts +21 -0
  216. package/dist/types/react/views/IsometricView.d.ts.map +1 -0
  217. package/dist/types/react/views/MapView.d.ts +16 -0
  218. package/dist/types/react/views/MapView.d.ts.map +1 -0
  219. package/dist/types/react/views/MobaView.d.ts +17 -0
  220. package/dist/types/react/views/MobaView.d.ts.map +1 -0
  221. package/dist/types/react/views/SideOnView.d.ts +23 -0
  222. package/dist/types/react/views/SideOnView.d.ts.map +1 -0
  223. package/dist/types/react/views/ThirdPersonFixedView.d.ts +21 -0
  224. package/dist/types/react/views/ThirdPersonFixedView.d.ts.map +1 -0
  225. package/dist/types/react/views/ThirdPersonView.d.ts +12 -0
  226. package/dist/types/react/views/ThirdPersonView.d.ts.map +1 -0
  227. package/dist/types/react/views/TopDownFixedView.d.ts +20 -0
  228. package/dist/types/react/views/TopDownFixedView.d.ts.map +1 -0
  229. package/dist/types/react/views/TopDownView.d.ts +12 -0
  230. package/dist/types/react/views/TopDownView.d.ts.map +1 -0
  231. package/dist/types/react/views/TwinStickView.d.ts +13 -0
  232. package/dist/types/react/views/TwinStickView.d.ts.map +1 -0
  233. package/dist/types/react/views/VehicleFixedView.d.ts +16 -0
  234. package/dist/types/react/views/VehicleFixedView.d.ts.map +1 -0
  235. package/dist/types/react/views/VehicleView.d.ts +13 -0
  236. package/dist/types/react/views/VehicleView.d.ts.map +1 -0
  237. package/dist/types/react/views/index.d.ts +21 -0
  238. package/dist/types/react/views/index.d.ts.map +1 -0
  239. package/dist/types/react/views/types.d.ts +136 -0
  240. package/dist/types/react/views/types.d.ts.map +1 -0
  241. package/dist/types/rollback.d.ts +193 -0
  242. package/dist/types/rollback.d.ts.map +1 -0
  243. package/dist/types/rollback.worker.d.ts +3 -0
  244. package/dist/types/rollback.worker.d.ts.map +1 -0
  245. package/dist/types/schema.d.ts +309 -0
  246. package/dist/types/schema.d.ts.map +1 -0
  247. package/dist/types/session-config.d.ts +119 -0
  248. package/dist/types/session-config.d.ts.map +1 -0
  249. package/dist/types/session.d.ts +120 -0
  250. package/dist/types/session.d.ts.map +1 -0
  251. package/dist/types/state.d.ts +400 -0
  252. package/dist/types/state.d.ts.map +1 -0
  253. package/dist/types/stats.d.ts +21 -0
  254. package/dist/types/stats.d.ts.map +1 -0
  255. package/dist/types/test-session.d.ts +170 -0
  256. package/dist/types/test-session.d.ts.map +1 -0
  257. package/dist/types/utils.d.ts +26 -0
  258. package/dist/types/utils.d.ts.map +1 -0
  259. package/dist/types/vite/codegen-runner.d.ts +27 -0
  260. package/dist/types/vite/codegen-runner.d.ts.map +1 -0
  261. package/dist/types/vite/index.d.ts +20 -0
  262. package/dist/types/vite/index.d.ts.map +1 -0
  263. package/dist/types/vite/module-builder.d.ts +28 -0
  264. package/dist/types/vite/module-builder.d.ts.map +1 -0
  265. package/dist/types/vite/plugin.d.ts +27 -0
  266. package/dist/types/vite/plugin.d.ts.map +1 -0
  267. package/dist/types/vite/types.d.ts +37 -0
  268. package/dist/types/vite/types.d.ts.map +1 -0
  269. package/dist/types/vite/wasm-compiler.d.ts +32 -0
  270. package/dist/types/vite/wasm-compiler.d.ts.map +1 -0
  271. package/dist/utils.d.ts +26 -0
  272. package/dist/utils.d.ts.map +1 -0
  273. package/dist/vite/codegen-runner.d.ts +27 -0
  274. package/dist/vite/codegen-runner.d.ts.map +1 -0
  275. package/dist/vite/index.d.ts +20 -0
  276. package/dist/vite/index.d.ts.map +1 -0
  277. package/dist/vite/index.js +4202 -0
  278. package/dist/vite/module-builder.d.ts +28 -0
  279. package/dist/vite/module-builder.d.ts.map +1 -0
  280. package/dist/vite/plugin.d.ts +27 -0
  281. package/dist/vite/plugin.d.ts.map +1 -0
  282. package/dist/vite/types.d.ts +37 -0
  283. package/dist/vite/types.d.ts.map +1 -0
  284. package/dist/vite/wasm-compiler.d.ts +32 -0
  285. package/dist/vite/wasm-compiler.d.ts.map +1 -0
  286. package/package.json +92 -0
@@ -0,0 +1,46 @@
1
+ import type { Vector2 } from 'three';
2
+ /**
3
+ * Standard action bit flags.
4
+ * These map to the standard "actions" flags8 control in mt.config.json.
5
+ */
6
+ export declare const ACTION_ATTACK: number;
7
+ export declare const ACTION_INTERACT: number;
8
+ export declare const ACTION_JUMP: number;
9
+ export declare const ACTION_CROUCH: number;
10
+ /**
11
+ * Raw input state from input devices
12
+ */
13
+ export interface RawInput {
14
+ /** Look/aim delta (mouse movement, right stick, etc.) */
15
+ look: Vector2;
16
+ /** Movement input (WASD, left stick, etc.) - normalized */
17
+ movement: Vector2;
18
+ /** Mouse button state (bitmask: 1=left, 2=middle, 4=right) */
19
+ mouseButtons: number;
20
+ /** Scroll wheel delta (positive = scroll up/away) */
21
+ scroll: number;
22
+ /** Standard action flags (bitmask of ACTION_* constants) */
23
+ actions: number;
24
+ }
25
+ /**
26
+ * Interface for input mappers
27
+ * Mappers translate device input (keyboard, mouse, touch, gamepad) into raw input
28
+ */
29
+ export interface InputMapper {
30
+ /** Poll current input state */
31
+ poll(): RawInput;
32
+ /** Start listening to input events */
33
+ bind(): void;
34
+ /** Stop listening to input events */
35
+ unbind(): void;
36
+ /** Enable/disable pointer lock behavior (optional, not all mappers support this) */
37
+ setPointerLockEnabled?(enabled: boolean): void;
38
+ /**
39
+ * Configure how mouse movement is captured into `RawInput.look` (optional).
40
+ * - pointerLock: only accumulate look delta while pointer locked (default)
41
+ * - always: always accumulate mouse movement (no pointer lock required)
42
+ * - drag: accumulate while any mouse button is pressed (click+drag)
43
+ */
44
+ setLookMode?(mode: 'pointerLock' | 'always' | 'drag'): void;
45
+ }
46
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/react/input/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAEpC;;;GAGG;AACH,eAAO,MAAM,aAAa,QAAS,CAAA;AACnC,eAAO,MAAM,eAAe,QAAS,CAAA;AACrC,eAAO,MAAM,WAAW,QAAS,CAAA;AACjC,eAAO,MAAM,aAAa,QAAS,CAAA;AAEnC;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,yDAAyD;IACzD,IAAI,EAAE,OAAO,CAAA;IACb,2DAA2D;IAC3D,QAAQ,EAAE,OAAO,CAAA;IACjB,8DAA8D;IAC9D,YAAY,EAAE,MAAM,CAAA;IACpB,qDAAqD;IACrD,MAAM,EAAE,MAAM,CAAA;IACd,4DAA4D;IAC5D,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,+BAA+B;IAC/B,IAAI,IAAI,QAAQ,CAAA;IAEhB,sCAAsC;IACtC,IAAI,IAAI,IAAI,CAAA;IAEZ,qCAAqC;IACrC,MAAM,IAAI,IAAI,CAAA;IAEd,oFAAoF;IACpF,qBAAqB,CAAC,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;IAE9C;;;;;OAKG;IACH,WAAW,CAAC,CAAC,IAAI,EAAE,aAAa,GAAG,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAA;CAC5D"}
@@ -0,0 +1,17 @@
1
+ import type { SessionContextValue, SessionProviderProps } from '../types/session';
2
+ export declare const SessionContext: import("react").Context<SessionContextValue | null>;
3
+ /**
4
+ * SessionProvider - provides session context to child components
5
+ *
6
+ * Wraps game components and manages:
7
+ * - Session lifecycle (connect, disconnect)
8
+ * - State snapshots per frame
9
+ * - Participant tracking
10
+ * - Input handling
11
+ */
12
+ export declare function SessionProvider({ config, children }: SessionProviderProps): import("react/jsx-runtime").JSX.Element;
13
+ /**
14
+ * Hook to access session context
15
+ */
16
+ export declare function useSessionContext(): SessionContextValue;
17
+ //# sourceMappingURL=SessionProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SessionProvider.d.ts","sourceRoot":"","sources":["../../../../src/react/providers/SessionProvider.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EAKrB,MAAM,kBAAkB,CAAA;AAQzB,eAAO,MAAM,cAAc,qDAAkD,CAAA;AAmE7E;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,oBAAoB,2CAmIzE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,mBAAmB,CAMvD"}
@@ -0,0 +1,2 @@
1
+ export { SessionProvider, SessionContext, useSessionContext } from './SessionProvider';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/react/providers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export type { Player, EntityStore, PlayerStore, SessionContextValue, SessionProviderProps, ReactSessionInterface, ReactCreateSession, UseSessionRenderCallback, } from './session';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/react/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,MAAM,EACN,WAAW,EACX,WAAW,EACX,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,WAAW,CAAA"}
@@ -0,0 +1,88 @@
1
+ import type { RefObject } from 'react';
2
+ import type { RootState } from '@react-three/fiber';
3
+ import type { StoreApi as ZustandStoreApi } from 'zustand';
4
+ import type { SessionConfig } from '../../session-config';
5
+ import type { SessionStats, SessionOptions, SessionInterface } from '../../session';
6
+ import type { Participant } from '../../input-graph';
7
+ import type { EntityRef, CompiledSchema } from '../../state';
8
+ import type { InputCodec } from '../../input-codec';
9
+ /**
10
+ * Player in a session - extends Participant with entity reference
11
+ */
12
+ export interface Player extends Participant {
13
+ entity: EntityRef;
14
+ isCurrentPlayer: boolean;
15
+ }
16
+ /**
17
+ * Zustand store for tracking entities matching a query
18
+ */
19
+ export type EntityStore = {
20
+ entities: EntityRef[];
21
+ updateEntities: (incoming: Generator<EntityRef>) => void;
22
+ };
23
+ /**
24
+ * Zustand store for tracking session players
25
+ */
26
+ export type PlayerStore = {
27
+ players: Player[];
28
+ update: (state: DataView, allParticipants: readonly Participant[], currentPlayerId: string) => void;
29
+ };
30
+ /**
31
+ * Session context value provided by SessionProvider
32
+ */
33
+ export interface SessionContextValue {
34
+ /** Ref to current state DataView for the current frame - use within useFrame */
35
+ stateRef: RefObject<DataView>;
36
+ /** Store tracking participants for the current stateRef tick */
37
+ participants: ZustandStoreApi<PlayerStore>;
38
+ /** Session is ready to be used */
39
+ isReady: boolean;
40
+ /** Error during session initialization */
41
+ error: Error | null;
42
+ /** Send input to the session */
43
+ sendInput: (input: Uint8Array) => void;
44
+ /** Compiled input bindings */
45
+ inputBindings: InputCodec;
46
+ /** Session has ended */
47
+ ended: boolean;
48
+ /** Session config */
49
+ config: SessionConfig;
50
+ /** Compiled state schema for runtime queries */
51
+ schema: CompiledSchema;
52
+ /** Get session stats */
53
+ getStats: () => SessionStats;
54
+ /** Get current player id */
55
+ currentPlayerId: string;
56
+ }
57
+ /**
58
+ * Props for SessionProvider component
59
+ */
60
+ export interface SessionProviderProps {
61
+ config: SessionOptions;
62
+ children: React.ReactNode;
63
+ }
64
+ /**
65
+ * Interface for session used by React components
66
+ */
67
+ export interface ReactSessionInterface {
68
+ getConfig: SessionInterface['getConfig'];
69
+ getInputBindings: SessionInterface['getInputBindings'];
70
+ sendInput: SessionInterface['sendInput'];
71
+ getState: SessionInterface['getState'];
72
+ getStats: SessionInterface['getStats'];
73
+ close: SessionInterface['close'];
74
+ getParticipants: SessionInterface['getParticipants'];
75
+ getCurrentPlayerId: SessionInterface['getCurrentPlayerId'];
76
+ }
77
+ /**
78
+ * Factory function type for creating sessions (allows test mocking)
79
+ */
80
+ export type ReactCreateSession = (config: SessionOptions) => Promise<ReactSessionInterface>;
81
+ /**
82
+ * Callback type for useFrame hook
83
+ */
84
+ export type UseSessionRenderCallback = (state: RootState & {
85
+ state: DataView;
86
+ players: Player[];
87
+ }, delta: number, frame?: XRFrame) => void;
88
+ //# sourceMappingURL=session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../../src/react/types/session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,KAAK,EAA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
+ import type { InputMapper } from './input/types';
4
+ /**
5
+ * Types that can be converted to Vector3
6
+ */
7
+ export type Vector3Like = Vector3 | [number, number, number] | {
8
+ x: number;
9
+ y: number;
10
+ z: number;
11
+ };
12
+ /**
13
+ * Types that can be converted to Quaternion
14
+ */
15
+ export type QuaternionLike = Quaternion | [number, number, number, number] | {
16
+ x: number;
17
+ y: number;
18
+ z: number;
19
+ w: number;
20
+ };
21
+ /**
22
+ * Supported camera view types
23
+ */
24
+ export type ViewType = 'firstPerson' | 'thirdPerson' | 'thirdPersonFixed' | 'topDown' | 'topDownFixed' | 'isometric' | 'sideOn' | 'map' | 'vehicle' | 'vehicleFixed' | 'twinStick' | 'moba' | 'asteroids';
25
+ /**
26
+ * Player component props
27
+ */
28
+ export interface PlayerProps {
29
+ /** Body position (from server/game state) */
30
+ position?: Vector3Like;
31
+ /** Body rotation quaternion (from server/game state) - NOT the aim */
32
+ rotation?: QuaternionLike;
33
+ /** Whether this player captures input (keyboard/mouse/touch) */
34
+ enableInput?: boolean;
35
+ /** Whether this player's camera is used for rendering */
36
+ enableCamera?: boolean;
37
+ /** Current camera view type */
38
+ view?: ViewType;
39
+ /** Custom input mapper (default: DesktopInputMapper) */
40
+ inputMapper?: InputMapper;
41
+ /** Distance from camera to player (third-person views) */
42
+ cameraDistance?: number;
43
+ /** Height offset for camera */
44
+ cameraHeight?: number;
45
+ /** Additional camera offset */
46
+ cameraOffset?: Vector3Like;
47
+ /**
48
+ * Camera smoothing/damping factor (0 = instant, approaching 1 = very smooth)
49
+ * Values are clamped to [0, 0.99] to prevent the camera from freezing.
50
+ */
51
+ damping?: number;
52
+ /** Pitch angle from vertical in radians (isometric, moba views) */
53
+ cameraAngle?: number;
54
+ /** Fixed camera yaw rotation in radians (topDownFixed, isometric, sideOn views) */
55
+ fixedYaw?: number;
56
+ /** Model position/rotation smoothing speed (higher = faster, 0 = instant) */
57
+ modelSmoothing?: number;
58
+ /**
59
+ * Vehicle-only: when true and moving backwards, swing the camera to the other side.
60
+ * Ignored by all non-vehicle views.
61
+ */
62
+ reverseCam?: boolean;
63
+ /** Name for the camera object (useful for testing/debugging) */
64
+ cameraName?: string;
65
+ /**
66
+ * Show crosshair when this player has camera enabled.
67
+ * The crosshair style adapts to the view type:
68
+ * - 'center' views (FPS, third-person): crosshair at screen center
69
+ * - 'cursor' views (twin-stick, MOBA): crosshair follows cursor
70
+ * - 'none' views (map, sideOn, asteroids): no crosshair
71
+ */
72
+ crosshair?: boolean;
73
+ /** Player model (consumer-provided mesh/geometry) */
74
+ children?: ReactNode;
75
+ }
76
+ /**
77
+ * Sampled player intent for network sync
78
+ *
79
+ * Coordinate convention (matches Three.js):
80
+ * - Right-handed, Y-up, XZ ground plane
81
+ * - Forward = -Z in heading-space (matches Three.js camera/object look direction)
82
+ *
83
+ * Intent model:
84
+ * - `heading`: Movement reference frame (move vector is relative to this)
85
+ * - `aim`: Attack/targeting direction (where camera points)
86
+ * - `move`: Movement intent relative to heading (NEVER world-space)
87
+ *
88
+ * For many views, heading === aim (same quaternion value).
89
+ *
90
+ * Views where aim can differ from heading:
91
+ * - Orbit-style thirdPerson: aim follows direction of travel while heading stays camera-relative.
92
+ * - Vehicle: heading = body direction (from server), aim = mouse direction
93
+ * - TwinStick: heading = screen up (fixed), aim = cursor direction
94
+ * - Moba: heading = iso camera direction (fixed), aim = cursor direction
95
+ */
96
+ export interface PlayerIntent {
97
+ /** Movement reference frame (facing direction quaternion) */
98
+ heading: Quaternion;
99
+ /** Attack/look direction (where camera points) */
100
+ aim: Quaternion;
101
+ /**
102
+ * Movement intent relative to heading (ALWAYS heading-space, NEVER world-space)
103
+ *
104
+ * Axis convention in heading-space (Three.js standard: forward = -Z):
105
+ * - move.x > 0: strafe right
106
+ * - move.x < 0: strafe left
107
+ * - move.z < 0: forward
108
+ * - move.z > 0: backward
109
+ *
110
+ * Examples:
111
+ * - Full forward: move = (0, 0, -1)
112
+ * - Full backward: move = (0, 0, 1)
113
+ * - Strafe right: move = (1, 0, 0)
114
+ *
115
+ * For vehicle-style controls:
116
+ * - steer = move.x
117
+ * - throttle = -move.z (so positive throttle = forward)
118
+ */
119
+ move: Vector3;
120
+ /** Standard action flags (bitmask of ACTION_* constants) */
121
+ actions: number;
122
+ }
123
+ /**
124
+ * Imperative handle exposed via ref
125
+ */
126
+ export interface PlayerHandle {
127
+ /** Set player body position (e.g., from server update) */
128
+ setPosition(pos: Vector3Like): void;
129
+ /** Set player body rotation (e.g., from server update) */
130
+ setRotation(rot: QuaternionLike): void;
131
+ /** Sample current intent for network sync */
132
+ sample(): PlayerIntent;
133
+ }
134
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/react/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAEhD;;GAEG;AACH,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GACxB;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAEvC;;GAEG;AACH,MAAM,MAAM,cAAc,GACtB,UAAU,GACV,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAChC;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAElD;;GAEG;AACH,MAAM,MAAM,QAAQ,GAChB,aAAa,GACb,aAAa,GACb,kBAAkB,GAClB,SAAS,GACT,cAAc,GACd,WAAW,GACX,QAAQ,GACR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AE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,0DAA0D;IAC1D,WAAW,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAAA;IACnC,0DAA0D;IAC1D,WAAW,CAAC,GAAG,EAAE,cAAc,GAAG,IAAI,CAAA;IACtC,6CAA6C;IAC7C,MAAM,IAAI,YAAY,CAAA;CACvB"}
@@ -0,0 +1,19 @@
1
+ import { Quaternion, Vector3 } from 'three';
2
+ import type { QuaternionLike, Vector3Like } from '../types';
3
+ /**
4
+ * Convert Vector3Like to Vector3
5
+ */
6
+ export declare function toVector3(v: Vector3Like): Vector3;
7
+ /**
8
+ * Convert QuaternionLike to Quaternion
9
+ */
10
+ export declare function toQuaternion(q: QuaternionLike): Quaternion;
11
+ /**
12
+ * Lerp between two values
13
+ */
14
+ export declare function lerp(a: number, b: number, t: number): number;
15
+ /**
16
+ * Clamp a value between min and max
17
+ */
18
+ export declare function clamp(value: number, min: number, max: number): number;
19
+ //# sourceMappingURL=math.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../../../src/react/utils/math.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAE3D;;GAEG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,WAAW,GAAG,OAAO,CAIjD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,cAAc,GAAG,UAAU,CAI1D;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAErE"}
@@ -0,0 +1,24 @@
1
+ import type { View } from './types';
2
+ /**
3
+ * Asteroids view (top-down with keyboard rotation)
4
+ *
5
+ * Style: Asteroids, classic arcade rotation+thrust games
6
+ *
7
+ * Architecture:
8
+ * - Pivot: at player position, no rotation (fixed north-up camera)
9
+ * - Camera: directly above pivot, looking straight down
10
+ *
11
+ * Controls:
12
+ * - Arrow Left/Right (look.x): rotate heading (turn ship)
13
+ * - Arrow Up/Down or W/S (movement.y): thrust forward/backward relative to heading
14
+ * - A/D (movement.x): strafe relative to heading
15
+ *
16
+ * This is different from topDownFixed which has screen-relative movement.
17
+ * Asteroids view has heading-relative movement like a spaceship.
18
+ *
19
+ * NOTE: This is for classic Asteroids-style rotation+thrust mechanics ONLY.
20
+ * For "tank games" (drive + shoot), use the `vehicle` view instead.
21
+ * For tank games with fixed camera, use `thirdPersonFixed`.
22
+ */
23
+ export declare const AsteroidsView: View;
24
+ //# sourceMappingURL=AsteroidsView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AsteroidsView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/AsteroidsView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AAW3D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,aAAa,EAAE,IAuE3B,CAAA"}
@@ -0,0 +1,10 @@
1
+ import type { View } from './types';
2
+ /**
3
+ * First-person view
4
+ *
5
+ * - Pivot: positioned at player's eye level, rotates on Y axis (yaw)
6
+ * - Camera: at pivot position, rotates on X axis (pitch)
7
+ * - Movement is relative to look direction
8
+ */
9
+ export declare const FirstPersonView: View;
10
+ //# sourceMappingURL=FirstPersonView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FirstPersonView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/FirstPersonView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AAmB3D;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,IAoG7B,CAAA"}
@@ -0,0 +1,21 @@
1
+ import type { View } from './types';
2
+ /**
3
+ * Isometric view (fixed angle, screen-relative WASD)
4
+ *
5
+ * Style: Diablo, Path of Exile, CRPGs
6
+ *
7
+ * Architecture:
8
+ * - Pivot: at player position, rotated by fixedYaw
9
+ * - Camera: at angle from vertical (cameraAngle), looking at player
10
+ *
11
+ * Mouse input is ignored. WASD is screen-relative, mapped to isometric axes.
12
+ * Movement is relative to the fixed camera yaw.
13
+ *
14
+ * Props:
15
+ * - cameraAngle: pitch from vertical in radians (default 45°)
16
+ * - fixedYaw: camera rotation in radians (default -45° for classic iso)
17
+ *
18
+ * heading and aim are both fixed to the camera yaw direction.
19
+ */
20
+ export declare const IsometricView: View;
21
+ //# sourceMappingURL=IsometricView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IsometricView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/IsometricView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AAY3D;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,aAAa,EAAE,IAuE3B,CAAA"}
@@ -0,0 +1,16 @@
1
+ import type { View } from './types';
2
+ /**
3
+ * Map / RTS view
4
+ *
5
+ * This view delegates camera control to drei's MapControls component,
6
+ * which is rendered by Player.tsx when view === 'map'.
7
+ *
8
+ * Controls (MapControls defaults):
9
+ * - Left-drag: Rotate
10
+ * - Right-drag: Pan
11
+ * - Scroll: Zoom
12
+ *
13
+ * The view just provides minimal state - MapControls handles everything.
14
+ */
15
+ export declare const MapView: View;
16
+ //# sourceMappingURL=MapView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MapView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/MapView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AAE3D;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,OAAO,EAAE,IA4BrB,CAAA"}
@@ -0,0 +1,17 @@
1
+ import type { View } from './types';
2
+ /**
3
+ * MOBA view (isometric camera + decoupled mouse aim)
4
+ *
5
+ * Style: League of Legends, Dota 2
6
+ *
7
+ * - Camera: fixed isometric yaw/pitch (north-east diagonal by default)
8
+ * - Movement: WASD screen-relative, interpreted relative to fixed camera yaw
9
+ * - heading: fixed quaternion matching camera yaw (movement reference frame)
10
+ * - aim: yaw-only quaternion driven by mouse X delta (independent of heading)
11
+ *
12
+ * Props:
13
+ * - cameraAngle: pitch from vertical in radians (default 45°)
14
+ * - fixedYaw: camera rotation in radians (default -45°)
15
+ */
16
+ export declare const MobaView: View;
17
+ //# sourceMappingURL=MobaView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MobaView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/MobaView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AAmB3D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,QAAQ,EAAE,IA4FtB,CAAA"}
@@ -0,0 +1,23 @@
1
+ import type { View } from './types';
2
+ /**
3
+ * Side-on view (2.5D platformer)
4
+ *
5
+ * Style: Limbo, Little Nightmares, 2.5D platformers
6
+ *
7
+ * Architecture:
8
+ * - Pivot: at player position, rotated 90° so camera faces the X axis
9
+ * - Camera: offset on local Z axis, looking at player
10
+ *
11
+ * This view treats the game as a 2D side-scroller rendered in 3D:
12
+ * - A/D moves left/right on X axis (world space)
13
+ * - W could be jump intent (game-level interpretation)
14
+ * - Mouse input is ignored
15
+ *
16
+ * The facing direction flips based on last horizontal movement:
17
+ * - Moving right (D) → facing direction +1 (facing +X)
18
+ * - Moving left (A) → facing direction -1 (facing -X)
19
+ *
20
+ * heading and aim are set to the current facing direction.
21
+ */
22
+ export declare const SideOnView: View;
23
+ //# sourceMappingURL=SideOnView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SideOnView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/SideOnView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AAK3D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,UAAU,EAAE,IA6FxB,CAAA"}
@@ -0,0 +1,21 @@
1
+ import type { View } from './types';
2
+ /**
3
+ * Third-person fixed view (over-shoulder, RE4/God of War style)
4
+ *
5
+ * The camera is on a ray extending BACKWARD from the player's head.
6
+ * Think of it as first-person, but the camera is pulled back along the look ray.
7
+ *
8
+ * Geometry:
9
+ * - Pivot is at the player's head, rotated by yaw AND pitch (like FPS)
10
+ * - Camera is positioned behind the pivot along its local +Z axis
11
+ * - Camera has no rotation of its own - it inherits pivot's orientation
12
+ *
13
+ * When you pitch down:
14
+ * - The pivot tilts down (looking at ground ahead)
15
+ * - The camera, being behind the pivot, ends up above and behind
16
+ * - The camera looks "over the shoulder" at the ground ahead
17
+ *
18
+ * This is the same as extending the FPS look ray backward.
19
+ */
20
+ export declare const ThirdPersonFixedView: View;
21
+ //# sourceMappingURL=ThirdPersonFixedView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThirdPersonFixedView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/ThirdPersonFixedView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AAwB3D;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,oBAAoB,EAAE,IA4HlC,CAAA"}
@@ -0,0 +1,12 @@
1
+ import type { View } from './types';
2
+ /**
3
+ * Third-person view (over-shoulder style)
4
+ *
5
+ * Architecture:
6
+ * - Pivot: positioned at player + height offset (this is what camera looks at)
7
+ * - Camera: orbits around pivot based on yaw/pitch, always looks at pivot
8
+ *
9
+ * Pitch controls camera's vertical position in arc around target (not camera rotation)
10
+ */
11
+ export declare const ThirdPersonView: View;
12
+ //# sourceMappingURL=ThirdPersonView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThirdPersonView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/ThirdPersonView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AAuB3D;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,IA2H7B,CAAA"}
@@ -0,0 +1,20 @@
1
+ import type { View } from './types';
2
+ /**
3
+ * Top-down fixed view (north-up, no mouse input)
4
+ *
5
+ * Style: Hotline Miami, classic Zelda
6
+ *
7
+ * Architecture:
8
+ * - Pivot: at player position, no rotation (fixed north-up)
9
+ * - Camera: directly above pivot, looking straight down
10
+ *
11
+ * Mouse input is ignored. WASD is screen-relative:
12
+ * - W = up on screen = -Z in world
13
+ * - S = down on screen = +Z in world
14
+ * - A = left on screen = -X in world
15
+ * - D = right on screen = +X in world
16
+ *
17
+ * heading and aim are both fixed facing -Z (identity rotation).
18
+ */
19
+ export declare const TopDownFixedView: View;
20
+ //# sourceMappingURL=TopDownFixedView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TopDownFixedView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/TopDownFixedView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AAK3D;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,gBAAgB,EAAE,IA8D9B,CAAA"}
@@ -0,0 +1,12 @@
1
+ import type { View } from './types';
2
+ /**
3
+ * Top-down view (overhead camera)
4
+ *
5
+ * Architecture:
6
+ * - Pivot: at player position, rotates on Y axis (yaw)
7
+ * - Camera: directly above pivot, looking straight down
8
+ *
9
+ * Mouse X rotates the view, movement is relative to camera rotation.
10
+ */
11
+ export declare const TopDownView: View;
12
+ //# sourceMappingURL=TopDownView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TopDownView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/TopDownView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AAS3D;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,EAAE,IAkEzB,CAAA"}
@@ -0,0 +1,13 @@
1
+ import type { View } from './types';
2
+ /**
3
+ * Twin-stick view (fixed top-down camera, independent mouse aim)
4
+ *
5
+ * Style: Enter the Gungeon, Nuclear Throne
6
+ *
7
+ * - Camera: fixed above the player, north-up (no camera rotation)
8
+ * - Movement: WASD is screen-relative (W=-Z, S=+Z, A=-X, D=+X)
9
+ * - heading: fixed to screen up (-Z) (identity quaternion)
10
+ * - aim: yaw-only quaternion driven by mouse X delta (independent of heading)
11
+ */
12
+ export declare const TwinStickView: View;
13
+ //# sourceMappingURL=TwinStickView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TwinStickView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/TwinStickView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AAa3D;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,EAAE,IAqF3B,CAAA"}
@@ -0,0 +1,16 @@
1
+ import type { View } from './types';
2
+ /**
3
+ * Vehicle Fixed view
4
+ *
5
+ * - `heading` comes from the body rotation (server / props), yaw-only.
6
+ * - `aim` is locked to heading yaw, but can include pitch for camera tilt.
7
+ * - Camera stays behind the vehicle body with damping (like a chase cam).
8
+ *
9
+ * Controls:
10
+ * - W/S: throttle (move.z, forward = -Z)
11
+ * - A/D: steering (move.x)
12
+ * - Mouse X: also contributes to steering (move.x)
13
+ * - Mouse Y: camera pitch (clamped)
14
+ */
15
+ export declare const VehicleFixedView: View;
16
+ //# sourceMappingURL=VehicleFixedView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VehicleFixedView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/VehicleFixedView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AA8B3D;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB,EAAE,IAgI9B,CAAA"}
@@ -0,0 +1,13 @@
1
+ import type { View } from './types';
2
+ /**
3
+ * Vehicle view
4
+ *
5
+ * Key rule: `heading` comes from the body rotation (server / props), while `aim`
6
+ * comes from local free-look input (mouse).
7
+ *
8
+ * - Movement: W/S = throttle (mapped to move.z), A/D = steering (mapped to move.x)
9
+ * - `move` is ALWAYS relative to `heading` (vehicle body direction)
10
+ * - Camera follows `aim` so you see where you're aiming, even while the body turns independently
11
+ */
12
+ export declare const VehicleView: View;
13
+ //# sourceMappingURL=VehicleView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VehicleView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/VehicleView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AA2B3D;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,EAAE,IAqJzB,CAAA"}