@pmndrs/klipp 0.0.0-stage → 0.14.0

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 (270) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +72 -2
  3. package/dist/_virtual/_rolldown/runtime.js +13 -0
  4. package/dist/core/CameraState.d.ts +32 -0
  5. package/dist/core/CameraState.js +97 -0
  6. package/dist/core/EventDispatcher.d.ts +18 -0
  7. package/dist/core/EventDispatcher.js +28 -0
  8. package/dist/core/Klipp.d.ts +109 -0
  9. package/dist/core/Klipp.js +253 -0
  10. package/dist/core/TargetExtent.d.ts +11 -0
  11. package/dist/core/TargetExtent.js +54 -0
  12. package/dist/core/TargetPose.d.ts +13 -0
  13. package/dist/core/TargetPose.js +21 -0
  14. package/dist/core/VirtualCamera.d.ts +102 -0
  15. package/dist/core/VirtualCamera.js +290 -0
  16. package/dist/core/aim/HardLookAtAim.d.ts +10 -0
  17. package/dist/core/aim/HardLookAtAim.js +19 -0
  18. package/dist/core/aim/PanTiltAim.d.ts +26 -0
  19. package/dist/core/aim/PanTiltAim.js +38 -0
  20. package/dist/core/aim/RotateWithFollowTargetAim.d.ts +19 -0
  21. package/dist/core/aim/RotateWithFollowTargetAim.js +23 -0
  22. package/dist/core/aim/RotationComposerAim.d.ts +27 -0
  23. package/dist/core/aim/RotationComposerAim.js +27 -0
  24. package/dist/core/aim/hardLookAt.d.ts +4 -0
  25. package/dist/core/aim/hardLookAt.js +13 -0
  26. package/dist/core/aim/index.d.ts +11 -0
  27. package/dist/core/aim/lookRotation.d.ts +6 -0
  28. package/dist/core/aim/lookRotation.js +46 -0
  29. package/dist/core/aim/panTilt.d.ts +16 -0
  30. package/dist/core/aim/panTilt.js +121 -0
  31. package/dist/core/aim/rotateWithFollowTarget.d.ts +20 -0
  32. package/dist/core/aim/rotateWithFollowTarget.js +35 -0
  33. package/dist/core/aim/rotationComposer.d.ts +58 -0
  34. package/dist/core/aim/rotationComposer.js +284 -0
  35. package/dist/core/blend/BlendCurves.d.ts +19 -0
  36. package/dist/core/blend/BlendCurves.js +22 -0
  37. package/dist/core/blend/BlendDefinition.d.ts +21 -0
  38. package/dist/core/blend/BlendDefinition.js +9 -0
  39. package/dist/core/blend/BlendDriver.d.ts +23 -0
  40. package/dist/core/blend/BlendDriver.js +42 -0
  41. package/dist/core/blend/BlendHints.d.ts +9 -0
  42. package/dist/core/blend/BlendHints.js +13 -0
  43. package/dist/core/blend/blend.d.ts +41 -0
  44. package/dist/core/blend/blend.js +110 -0
  45. package/dist/core/blend/index.d.ts +6 -0
  46. package/dist/core/blend/lerpCameraState.d.ts +4 -0
  47. package/dist/core/blend/lerpCameraState.js +143 -0
  48. package/dist/core/body/BindingModes.d.ts +9 -0
  49. package/dist/core/body/BindingModes.js +11 -0
  50. package/dist/core/body/FollowBody.d.ts +24 -0
  51. package/dist/core/body/FollowBody.js +26 -0
  52. package/dist/core/body/HardLockToTargetBody.d.ts +17 -0
  53. package/dist/core/body/HardLockToTargetBody.js +20 -0
  54. package/dist/core/body/OrbitFollowBody.d.ts +47 -0
  55. package/dist/core/body/OrbitFollowBody.js +48 -0
  56. package/dist/core/body/PositionComposerBody.d.ts +28 -0
  57. package/dist/core/body/PositionComposerBody.js +27 -0
  58. package/dist/core/body/follow.d.ts +33 -0
  59. package/dist/core/body/follow.js +83 -0
  60. package/dist/core/body/hardLockToTarget.d.ts +17 -0
  61. package/dist/core/body/hardLockToTarget.js +26 -0
  62. package/dist/core/body/index.d.ts +17 -0
  63. package/dist/core/body/orbitFollow.d.ts +76 -0
  64. package/dist/core/body/orbitFollow.js +336 -0
  65. package/dist/core/body/positionComposer.d.ts +56 -0
  66. package/dist/core/body/positionComposer.js +207 -0
  67. package/dist/core/body/safeFromToRotation.d.ts +3 -0
  68. package/dist/core/body/safeFromToRotation.js +39 -0
  69. package/dist/core/body/threeRing.d.ts +28 -0
  70. package/dist/core/body/threeRing.js +100 -0
  71. package/dist/core/body/tracker.d.ts +42 -0
  72. package/dist/core/body/tracker.js +193 -0
  73. package/dist/core/damping/Damper.d.ts +11 -0
  74. package/dist/core/damping/Damper.js +22 -0
  75. package/dist/core/damping/damping.d.ts +30 -0
  76. package/dist/core/damping/damping.js +119 -0
  77. package/dist/core/damping/index.d.ts +5 -0
  78. package/dist/core/damping/predictor.d.ts +16 -0
  79. package/dist/core/damping/predictor.js +56 -0
  80. package/dist/core/debug/debugZones.d.ts +16 -0
  81. package/dist/core/debug/debugZones.js +38 -0
  82. package/dist/core/debug/index.d.ts +2 -0
  83. package/dist/core/extension/GroupFramingExtension.d.ts +26 -0
  84. package/dist/core/extension/GroupFramingExtension.js +24 -0
  85. package/dist/core/extension/LensExtension.d.ts +20 -0
  86. package/dist/core/extension/LensExtension.js +12 -0
  87. package/dist/core/extension/groupFraming.d.ts +62 -0
  88. package/dist/core/extension/groupFraming.js +271 -0
  89. package/dist/core/extension/index.d.ts +6 -0
  90. package/dist/core/extension/lens.d.ts +35 -0
  91. package/dist/core/extension/lens.js +57 -0
  92. package/dist/core/groups/ClearShot.d.ts +32 -0
  93. package/dist/core/groups/MixingCamera.d.ts +20 -0
  94. package/dist/core/groups/Sequencer.d.ts +24 -0
  95. package/dist/core/groups/StateDrivenCamera.d.ts +26 -0
  96. package/dist/core/groups/clearShotState.d.ts +32 -0
  97. package/dist/core/groups/index.d.ts +11 -0
  98. package/dist/core/groups/mixCameraStates.d.ts +13 -0
  99. package/dist/core/groups/sequencerState.d.ts +26 -0
  100. package/dist/core/groups/stateDrivenState.d.ts +28 -0
  101. package/dist/core/impulse/ImpulseField.d.ts +15 -0
  102. package/dist/core/impulse/ImpulseField.js +22 -0
  103. package/dist/core/impulse/ImpulseListenerNoise.d.ts +19 -0
  104. package/dist/core/impulse/ImpulseListenerNoise.js +29 -0
  105. package/dist/core/impulse/impulseListener.d.ts +13 -0
  106. package/dist/core/impulse/impulseListener.js +14 -0
  107. package/dist/core/impulse/impulses.d.ts +54 -0
  108. package/dist/core/impulse/impulses.js +84 -0
  109. package/dist/core/impulse/index.d.ts +6 -0
  110. package/dist/core/index.d.ts +20 -0
  111. package/dist/core/index.js +52 -0
  112. package/dist/core/input/InputAxis.d.ts +29 -0
  113. package/dist/core/input/InputAxis.js +28 -0
  114. package/dist/core/input/InputAxisOwner.d.ts +6 -0
  115. package/dist/core/input/InputAxisOwner.js +4 -0
  116. package/dist/core/input/InputController.d.ts +15 -0
  117. package/dist/core/input/InputController.js +24 -0
  118. package/dist/core/input/axis.d.ts +52 -0
  119. package/dist/core/input/axis.js +89 -0
  120. package/dist/core/input/consumedInput.d.ts +37 -0
  121. package/dist/core/input/consumedInput.js +34 -0
  122. package/dist/core/input/index.d.ts +9 -0
  123. package/dist/core/input/inputMapping.d.ts +46 -0
  124. package/dist/core/input/inputMapping.js +55 -0
  125. package/dist/core/input/shortestWrappedDelta.d.ts +2 -0
  126. package/dist/core/input/shortestWrappedDelta.js +11 -0
  127. package/dist/core/internal.d.ts +16 -0
  128. package/dist/core/internal.js +19 -0
  129. package/dist/core/klippState.d.ts +78 -0
  130. package/dist/core/klippState.js +124 -0
  131. package/dist/core/noise/BasicMultiChannelPerlinNoise.d.ts +21 -0
  132. package/dist/core/noise/BasicMultiChannelPerlinNoise.js +13 -0
  133. package/dist/core/noise/index.d.ts +3 -0
  134. package/dist/core/noise/perlinNoise.d.ts +36 -0
  135. package/dist/core/noise/perlinNoise.js +110 -0
  136. package/dist/core/params.d.ts +2 -0
  137. package/dist/core/params.js +12 -0
  138. package/dist/dom/DebugOverlay.d.ts +11 -0
  139. package/dist/dom/DebugOverlay.js +96 -0
  140. package/dist/dom/InputControllerDom.d.ts +15 -0
  141. package/dist/dom/InputControllerDom.js +31 -0
  142. package/dist/dom/InputSystem.d.ts +40 -0
  143. package/dist/dom/InputSystem.js +113 -0
  144. package/dist/dom/index.d.ts +3 -0
  145. package/dist/dom/index.js +5 -0
  146. package/dist/input-sources/buttonInput.d.ts +15 -0
  147. package/dist/input-sources/buttonInput.js +23 -0
  148. package/dist/input-sources/isInsideInteractiveArea.d.ts +9 -0
  149. package/dist/input-sources/isInsideInteractiveArea.js +11 -0
  150. package/dist/input-sources/mouse.d.ts +47 -0
  151. package/dist/input-sources/mouse.js +171 -0
  152. package/dist/input-sources/safariGesture.d.ts +32 -0
  153. package/dist/input-sources/safariGesture.js +107 -0
  154. package/dist/input-sources/suppressNativeGestures.d.ts +5 -0
  155. package/dist/input-sources/suppressNativeGestures.js +32 -0
  156. package/dist/input-sources/touch.d.ts +47 -0
  157. package/dist/input-sources/touch.js +173 -0
  158. package/dist/input-sources/wheel.d.ts +28 -0
  159. package/dist/input-sources/wheel.js +44 -0
  160. package/dist/react/CameraFrustumHelper.d.ts +13 -0
  161. package/dist/react/CameraFrustumHelper.js +32 -0
  162. package/dist/react/DebugZoneOverlay.d.ts +7 -0
  163. package/dist/react/DebugZoneOverlay.js +23 -0
  164. package/dist/react/Klipp.d.ts +20 -0
  165. package/dist/react/Klipp.js +47 -0
  166. package/dist/react/KlippContext.d.ts +5 -0
  167. package/dist/react/KlippContext.js +11 -0
  168. package/dist/react/VirtualCamera.d.ts +28 -0
  169. package/dist/react/VirtualCamera.js +81 -0
  170. package/dist/react/VirtualCameraContext.d.ts +11 -0
  171. package/dist/react/VirtualCameraContext.js +21 -0
  172. package/dist/react/aim/Aim.d.ts +11 -0
  173. package/dist/react/aim/Aim.js +14 -0
  174. package/dist/react/aim/HardLookAt.d.ts +10 -0
  175. package/dist/react/aim/HardLookAt.js +15 -0
  176. package/dist/react/aim/PanTilt.d.ts +31 -0
  177. package/dist/react/aim/PanTilt.js +38 -0
  178. package/dist/react/aim/RotateWithFollowTarget.d.ts +10 -0
  179. package/dist/react/aim/RotateWithFollowTarget.js +18 -0
  180. package/dist/react/aim/RotationComposer.d.ts +12 -0
  181. package/dist/react/aim/RotationComposer.js +34 -0
  182. package/dist/react/body/Body.d.ts +11 -0
  183. package/dist/react/body/Body.js +14 -0
  184. package/dist/react/body/CameraControls.d.ts +50 -0
  185. package/dist/react/body/CameraControls.js +106 -0
  186. package/dist/react/body/Follow.d.ts +10 -0
  187. package/dist/react/body/Follow.js +20 -0
  188. package/dist/react/body/HardLockToTarget.d.ts +10 -0
  189. package/dist/react/body/HardLockToTarget.js +18 -0
  190. package/dist/react/body/OrbitFollow.d.ts +25 -0
  191. package/dist/react/body/OrbitFollow.js +67 -0
  192. package/dist/react/body/PositionComposer.d.ts +12 -0
  193. package/dist/react/body/PositionComposer.js +32 -0
  194. package/dist/react/body/camera-controls.d.ts +2 -0
  195. package/dist/react/body/camera-controls.js +3 -0
  196. package/dist/react/extension/Extension.d.ts +7 -0
  197. package/dist/react/extension/Extension.js +10 -0
  198. package/dist/react/extension/GroupFraming.d.ts +14 -0
  199. package/dist/react/extension/GroupFraming.js +52 -0
  200. package/dist/react/extension/Lens.d.ts +7 -0
  201. package/dist/react/extension/Lens.js +31 -0
  202. package/dist/react/impulse/ImpulseListener.d.ts +12 -0
  203. package/dist/react/impulse/ImpulseListener.js +33 -0
  204. package/dist/react/index.d.ts +24 -0
  205. package/dist/react/index.js +24 -0
  206. package/dist/react/input/InputAxisOwnerContext.d.ts +3 -0
  207. package/dist/react/input/InputAxisOwnerContext.js +6 -0
  208. package/dist/react/input/InputController.d.ts +53 -0
  209. package/dist/react/input/InputController.js +115 -0
  210. package/dist/react/noise/BasicMultiChannelPerlin.d.ts +7 -0
  211. package/dist/react/noise/BasicMultiChannelPerlin.js +14 -0
  212. package/dist/react/noise/Noise.d.ts +5 -0
  213. package/dist/react/noise/Noise.js +6 -0
  214. package/dist/react/noise/useBasicMultiChannelPerlinNoise.d.ts +4 -0
  215. package/dist/react/noise/useBasicMultiChannelPerlinNoise.js +21 -0
  216. package/dist/react/useCameraTransitionEvent.d.ts +12 -0
  217. package/dist/react/useCameraTransitionEvent.js +14 -0
  218. package/dist/three/CameraFrustumHelperThree.d.ts +11 -0
  219. package/dist/three/CameraFrustumHelperThree.js +44 -0
  220. package/dist/three/KlippThree.d.ts +18 -0
  221. package/dist/three/KlippThree.js +50 -0
  222. package/dist/three/VirtualCameraThree.d.ts +35 -0
  223. package/dist/three/VirtualCameraThree.js +108 -0
  224. package/dist/three/aim/HardLookAtAimThree.d.ts +10 -0
  225. package/dist/three/aim/HardLookAtAimThree.js +14 -0
  226. package/dist/three/aim/PanTiltAimThree.d.ts +10 -0
  227. package/dist/three/aim/PanTiltAimThree.js +15 -0
  228. package/dist/three/aim/RotateWithFollowTargetAimThree.d.ts +11 -0
  229. package/dist/three/aim/RotateWithFollowTargetAimThree.js +15 -0
  230. package/dist/three/aim/RotationComposerAimThree.d.ts +26 -0
  231. package/dist/three/aim/RotationComposerAimThree.js +35 -0
  232. package/dist/three/body/CameraControlsBodyThree.d.ts +30 -0
  233. package/dist/three/body/CameraControlsBodyThree.js +54 -0
  234. package/dist/three/body/FollowBodyThree.d.ts +16 -0
  235. package/dist/three/body/FollowBodyThree.js +23 -0
  236. package/dist/three/body/HardLockToTargetBodyThree.d.ts +11 -0
  237. package/dist/three/body/HardLockToTargetBodyThree.js +14 -0
  238. package/dist/three/body/OrbitFollowBodyThree.d.ts +16 -0
  239. package/dist/three/body/OrbitFollowBodyThree.js +23 -0
  240. package/dist/three/body/OrbitFollowHelperThree.d.ts +23 -0
  241. package/dist/three/body/OrbitFollowHelperThree.js +85 -0
  242. package/dist/three/body/PositionComposerBodyThree.d.ts +24 -0
  243. package/dist/three/body/PositionComposerBodyThree.js +31 -0
  244. package/dist/three/camera.d.ts +10 -0
  245. package/dist/three/camera.js +39 -0
  246. package/dist/three/damping/Predictor.d.ts +12 -0
  247. package/dist/three/damping/Predictor.js +30 -0
  248. package/dist/three/damping/QuaternionDamper.d.ts +10 -0
  249. package/dist/three/damping/QuaternionDamper.js +28 -0
  250. package/dist/three/damping/Vector3Damper.d.ts +10 -0
  251. package/dist/three/damping/Vector3Damper.js +26 -0
  252. package/dist/three/extension/GroupFramingExtensionThree.d.ts +13 -0
  253. package/dist/three/extension/GroupFramingExtensionThree.js +23 -0
  254. package/dist/three/extension/TargetGroup.d.ts +32 -0
  255. package/dist/three/extension/TargetGroup.js +53 -0
  256. package/dist/three/index.d.ts +24 -0
  257. package/dist/three/index.js +25 -0
  258. package/dist/three/noise/BasicMultiChannelPerlinNoiseThree.d.ts +16 -0
  259. package/dist/three/noise/BasicMultiChannelPerlinNoiseThree.js +17 -0
  260. package/dist/three/readTargetExtent.d.ts +9 -0
  261. package/dist/three/readTargetExtent.js +25 -0
  262. package/dist/three/readTargetPose.d.ts +8 -0
  263. package/dist/three/readTargetPose.js +21 -0
  264. package/dist/three/resolve/Target.d.ts +17 -0
  265. package/dist/three/resolve/Target.js +62 -0
  266. package/dist/three/resolve/TargetRegistry.d.ts +27 -0
  267. package/dist/three/resolve/TargetRegistry.js +78 -0
  268. package/dist/three/resolve/resolveVector3.d.ts +12 -0
  269. package/dist/three/resolve/resolveVector3.js +29 -0
  270. package/package.json +120 -4
@@ -0,0 +1,29 @@
1
+ import { createParams } from "./impulseListener.js";
2
+ import { vec3 } from "math";
3
+ //#region src/core/impulse/ImpulseListenerNoise.ts
4
+ var scratchOffset = [
5
+ 0,
6
+ 0,
7
+ 0
8
+ ];
9
+ /** Applies impulse offsets and optional strength-driven Perlin shake. */
10
+ var ImpulseListenerNoise = class {
11
+ shake;
12
+ constructor(options) {
13
+ Object.assign(this, createParams(options));
14
+ this.shake = options?.shake;
15
+ }
16
+ /** Apply the current impulse effect and report whether events remain active. */
17
+ update = (out, dt, justActivated, now) => {
18
+ const strength = this.field.sampleAt(scratchOffset, out.position, this.channelMask, this.gain, now);
19
+ if (this.cameraSpace) vec3.transformQuat(scratchOffset, scratchOffset, out.quaternion);
20
+ vec3.add(out.position, out.position, scratchOffset);
21
+ if (this.shake) {
22
+ this.shake.amplitudeGain = strength;
23
+ this.shake.update(out, dt, justActivated);
24
+ }
25
+ return this.field.hasEvents;
26
+ };
27
+ };
28
+ //#endregion
29
+ export { ImpulseListenerNoise };
@@ -0,0 +1,13 @@
1
+ import { type ImpulseField } from './ImpulseField.js';
2
+ export type ImpulseListenerParams = {
3
+ /** Impulse field to sample. */
4
+ field: ImpulseField;
5
+ /** Only reacts to events where `(event.channel & channelMask) !== 0`. */
6
+ channelMask: number;
7
+ /** Multiplies the sampled offset. `0` mutes this listener entirely. */
8
+ gain: number;
9
+ /** Whether to apply the impulse direction in camera space. */
10
+ cameraSpace: boolean;
11
+ };
12
+ /** Every setting from `settings`, or its default. */
13
+ export declare const createParams: (settings?: Partial<ImpulseListenerParams>) => ImpulseListenerParams;
@@ -0,0 +1,14 @@
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
+ import { withDefaults } from "../params.js";
3
+ import { impulseField } from "./ImpulseField.js";
4
+ //#region src/core/impulse/impulseListener.ts
5
+ var impulseListener_exports = /* @__PURE__ */ __exportAll({ createParams: () => createParams });
6
+ /** Every setting from `settings`, or its default. */
7
+ var createParams = (settings) => withDefaults({
8
+ field: impulseField,
9
+ channelMask: 1,
10
+ gain: 1,
11
+ cameraSpace: false
12
+ }, settings);
13
+ //#endregion
14
+ export { createParams, impulseListener_exports };
@@ -0,0 +1,54 @@
1
+ import { type Vec3 } from 'math';
2
+ /** Shared clock value used by impulse generation and sampling. */
3
+ export type ImpulseClockSeconds = number;
4
+ /** Maps normalized impulse progress to amplitude. */
5
+ export type ImpulseShape = (t: number) => number;
6
+ /** Built-in impulse envelope shapes. */
7
+ export declare const ImpulseShapes: {
8
+ recoil: (t: number) => number;
9
+ bump: (t: number) => number;
10
+ explosion: (t: number) => number;
11
+ rumble: (t: number) => number;
12
+ };
13
+ export type GenerateImpulseOptions = {
14
+ /** World-space origin of the event. */
15
+ position: Vec3;
16
+ /** World-space direction and peak strength of the kick. */
17
+ direction?: Vec3;
18
+ /** The envelope's amplitude curve. */
19
+ shape?: ImpulseShape;
20
+ /** Seconds `shape` is stretched across. */
21
+ duration?: number;
22
+ /** Distance from `position` within which the event is at full strength. */
23
+ radius?: number;
24
+ /** Distance beyond `radius` over which strength falls to zero. */
25
+ dissipationDistance?: number;
26
+ /** Propagation speed in world units per second. `Infinity` means no delay. */
27
+ propagationSpeed?: number;
28
+ /** Bitmask - a listener only reacts if `(channel & listener.channelMask) !== 0`. */
29
+ channel?: number;
30
+ };
31
+ export type ImpulseEvent = {
32
+ position: Vec3;
33
+ direction: Vec3;
34
+ startTime: ImpulseClockSeconds;
35
+ shape: ImpulseShape;
36
+ duration: number;
37
+ radius: number;
38
+ dissipationDistance: number;
39
+ propagationSpeed: number;
40
+ channel: number;
41
+ expiresAt: ImpulseClockSeconds;
42
+ };
43
+ export type ImpulseFieldState = {
44
+ events: ImpulseEvent[];
45
+ };
46
+ export declare const createFieldState: () => ImpulseFieldState;
47
+ /** The default impulse clock, in seconds. */
48
+ export declare const now: () => ImpulseClockSeconds;
49
+ /** Drop expired events in place, without allocating. */
50
+ export declare function prune(state: ImpulseFieldState, now: ImpulseClockSeconds): void;
51
+ /** Register a new impulse event. */
52
+ export declare function generate(state: ImpulseFieldState, options: GenerateImpulseOptions, now: ImpulseClockSeconds): void;
53
+ /** Write the summed offset at `samplePosition` into `outPositionOffset` and return its current strength. */
54
+ export declare function sample(outPositionOffset: Vec3, state: ImpulseFieldState, samplePosition: Vec3, channelMask: number, gain: number, now: ImpulseClockSeconds): number;
@@ -0,0 +1,84 @@
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
+ import { smoothstep, vec3 } from "math";
3
+ //#region src/core/impulse/impulses.ts
4
+ var impulses_exports = /* @__PURE__ */ __exportAll({
5
+ ImpulseShapes: () => ImpulseShapes,
6
+ createFieldState: () => createFieldState,
7
+ generate: () => generate,
8
+ now: () => now,
9
+ prune: () => prune,
10
+ sample: () => sample
11
+ });
12
+ /** Built-in impulse envelope shapes. */
13
+ var ImpulseShapes = {
14
+ recoil: (t) => 1 - smoothstep(0, 1, t),
15
+ bump: (t) => Math.min(1, t / .3) * Math.min(1, (1 - t) / .6),
16
+ explosion: (t) => Math.min(1, t / .1) * Math.min(1, (1 - t) / .5),
17
+ rumble: (t) => Math.min(1, t / .05) * Math.min(1, (1 - t) / .15)
18
+ };
19
+ var createFieldState = () => ({ events: [] });
20
+ /** The default impulse clock, in seconds. */
21
+ var now = () => performance.now() / 1e3;
22
+ function distanceFalloff(distance, radius, dissipationDistance) {
23
+ if (dissipationDistance <= 0) return 1;
24
+ if (distance <= radius) return 1;
25
+ const t = (distance - radius) / dissipationDistance;
26
+ return t >= 1 ? 0 : 1 - t;
27
+ }
28
+ /** Drop expired events in place, without allocating. */
29
+ function prune(state, now) {
30
+ const { events } = state;
31
+ let writeIndex = 0;
32
+ for (let readIndex = 0; readIndex < events.length; readIndex++) {
33
+ const event = events[readIndex];
34
+ if (now <= event.expiresAt) events[writeIndex++] = event;
35
+ }
36
+ events.length = writeIndex;
37
+ }
38
+ /** Register a new impulse event. */
39
+ function generate(state, options, now) {
40
+ prune(state, now);
41
+ const duration = options.duration ?? .4;
42
+ const radius = options.radius ?? 0;
43
+ const dissipationDistance = options.dissipationDistance ?? 0;
44
+ const propagationSpeed = options.propagationSpeed ?? Infinity;
45
+ const maxDelay = Number.isFinite(propagationSpeed) && propagationSpeed > 0 ? (radius + dissipationDistance) / propagationSpeed : 0;
46
+ state.events.push({
47
+ position: vec3.clone(options.position),
48
+ direction: options.direction ? vec3.clone(options.direction) : [
49
+ 0,
50
+ 0,
51
+ 0
52
+ ],
53
+ startTime: now,
54
+ shape: options.shape ?? ImpulseShapes.bump,
55
+ duration,
56
+ radius,
57
+ dissipationDistance,
58
+ propagationSpeed,
59
+ channel: options.channel ?? 1,
60
+ expiresAt: now + duration + maxDelay
61
+ });
62
+ }
63
+ /** Write the summed offset at `samplePosition` into `outPositionOffset` and return its current strength. */
64
+ function sample(outPositionOffset, state, samplePosition, channelMask, gain, now) {
65
+ vec3.set(outPositionOffset, 0, 0, 0);
66
+ if (state.events.length === 0) return 0;
67
+ prune(state, now);
68
+ let strength = 0;
69
+ for (const event of state.events) {
70
+ if ((event.channel & channelMask) === 0) continue;
71
+ const distance = vec3.distance(samplePosition, event.position);
72
+ const delay = Number.isFinite(event.propagationSpeed) && event.propagationSpeed > 0 ? distance / event.propagationSpeed : 0;
73
+ const localTime = now - event.startTime - delay;
74
+ const t = event.duration > 0 ? localTime / event.duration : -1;
75
+ if (t < 0 || t > 1) continue;
76
+ const amplitude = event.shape(t) * distanceFalloff(distance, event.radius, event.dissipationDistance) * gain;
77
+ if (amplitude <= 0) continue;
78
+ vec3.scaleAndAdd(outPositionOffset, outPositionOffset, event.direction, amplitude);
79
+ strength += amplitude;
80
+ }
81
+ return strength;
82
+ }
83
+ //#endregion
84
+ export { ImpulseShapes, createFieldState, generate, impulses_exports, now, prune, sample };
@@ -0,0 +1,6 @@
1
+ export { ImpulseField, impulseField } from './ImpulseField.js';
2
+ export { ImpulseListenerNoise, type ImpulseListenerOptions } from './ImpulseListenerNoise.js';
3
+ export * as impulseListener from './impulseListener.js';
4
+ export type { ImpulseListenerParams } from './impulseListener.js';
5
+ export * as impulses from './impulses.js';
6
+ export { ImpulseShapes, type GenerateImpulseOptions, type ImpulseShape, type ImpulseEvent, type ImpulseFieldState, type ImpulseClockSeconds, } from './impulses.js';
@@ -0,0 +1,20 @@
1
+ export { EventDispatcher, type DispatchedEvent, type EventListener } from './EventDispatcher.js';
2
+ export { Klipp, type CameraTransitionEventMap, type FrameUpdate, type KlippMode, type KlippOptions, type VirtualCameraConfig, } from './Klipp.js';
3
+ export { VirtualCamera, type CameraPiece, type CameraStateWriter, type StandbyUpdate, type VirtualCameraOptions, } from './VirtualCamera.js';
4
+ export * as cameraState from './CameraState.js';
5
+ export type { CameraState } from './CameraState.js';
6
+ export * as klippState from './klippState.js';
7
+ export type { KlippCamera, KlippEvent, KlippParams, KlippState } from './klippState.js';
8
+ export * as targetExtent from './TargetExtent.js';
9
+ export type { TargetExtent } from './TargetExtent.js';
10
+ export * as targetPose from './TargetPose.js';
11
+ export type { TargetPose } from './TargetPose.js';
12
+ export * from './aim/index.js';
13
+ export * from './blend/index.js';
14
+ export * from './body/index.js';
15
+ export * from './damping/index.js';
16
+ export * from './debug/index.js';
17
+ export * from './extension/index.js';
18
+ export * from './impulse/index.js';
19
+ export * from './input/index.js';
20
+ export * from './noise/index.js';
@@ -0,0 +1,52 @@
1
+ import { EventDispatcher } from "./EventDispatcher.js";
2
+ import { BlendHints, hasBlendHint } from "./blend/BlendHints.js";
3
+ import { CameraState_exports } from "./CameraState.js";
4
+ import { damping_exports } from "./damping/damping.js";
5
+ import { blend_exports } from "./blend/blend.js";
6
+ import { klippState_exports } from "./klippState.js";
7
+ import { isInputAxisOwner } from "./input/InputAxisOwner.js";
8
+ import { VirtualCamera } from "./VirtualCamera.js";
9
+ import { BlendCurves } from "./blend/BlendCurves.js";
10
+ import { DEFAULT_BLEND } from "./blend/BlendDefinition.js";
11
+ import { Klipp } from "./Klipp.js";
12
+ import { TargetExtent_exports } from "./TargetExtent.js";
13
+ import { TargetPose_exports } from "./TargetPose.js";
14
+ import { hardLookAt_exports } from "./aim/hardLookAt.js";
15
+ import { HardLookAtAim } from "./aim/HardLookAtAim.js";
16
+ import { rotateWithFollowTarget_exports } from "./aim/rotateWithFollowTarget.js";
17
+ import { RotateWithFollowTargetAim } from "./aim/RotateWithFollowTargetAim.js";
18
+ import { predictor_exports } from "./damping/predictor.js";
19
+ import { rotationComposer_exports } from "./aim/rotationComposer.js";
20
+ import { RotationComposerAim } from "./aim/RotationComposerAim.js";
21
+ import { axis_exports } from "./input/axis.js";
22
+ import { InputAxis } from "./input/InputAxis.js";
23
+ import { panTilt_exports } from "./aim/panTilt.js";
24
+ import { PanTiltAim } from "./aim/PanTiltAim.js";
25
+ import { BlendDriver } from "./blend/BlendDriver.js";
26
+ import { BindingModes } from "./body/BindingModes.js";
27
+ import { hardLockToTarget_exports } from "./body/hardLockToTarget.js";
28
+ import { HardLockToTargetBody } from "./body/HardLockToTargetBody.js";
29
+ import { tracker_exports } from "./body/tracker.js";
30
+ import { follow_exports } from "./body/follow.js";
31
+ import { FollowBody } from "./body/FollowBody.js";
32
+ import { threeRing_exports } from "./body/threeRing.js";
33
+ import { orbitFollow_exports } from "./body/orbitFollow.js";
34
+ import { OrbitFollowBody } from "./body/OrbitFollowBody.js";
35
+ import { positionComposer_exports } from "./body/positionComposer.js";
36
+ import { PositionComposerBody } from "./body/PositionComposerBody.js";
37
+ import { Damper } from "./damping/Damper.js";
38
+ import { groupFraming_exports } from "./extension/groupFraming.js";
39
+ import { debugZones_exports } from "./debug/debugZones.js";
40
+ import { lens_exports } from "./extension/lens.js";
41
+ import { LensExtension } from "./extension/LensExtension.js";
42
+ import { GroupFramingExtension } from "./extension/GroupFramingExtension.js";
43
+ import { ImpulseShapes, impulses_exports } from "./impulse/impulses.js";
44
+ import { ImpulseField, impulseField } from "./impulse/ImpulseField.js";
45
+ import { impulseListener_exports } from "./impulse/impulseListener.js";
46
+ import { ImpulseListenerNoise } from "./impulse/ImpulseListenerNoise.js";
47
+ import { consumedInput_exports } from "./input/consumedInput.js";
48
+ import { inputMapping_exports } from "./input/inputMapping.js";
49
+ import { InputController } from "./input/InputController.js";
50
+ import { perlinNoise_exports } from "./noise/perlinNoise.js";
51
+ import { BasicMultiChannelPerlinNoise } from "./noise/BasicMultiChannelPerlinNoise.js";
52
+ export { BasicMultiChannelPerlinNoise, BindingModes, BlendCurves, BlendDriver, BlendHints, DEFAULT_BLEND, Damper, EventDispatcher, FollowBody, GroupFramingExtension, HardLockToTargetBody, HardLookAtAim, ImpulseField, ImpulseListenerNoise, ImpulseShapes, InputAxis, InputController, Klipp, LensExtension, OrbitFollowBody, PanTiltAim, PositionComposerBody, RotateWithFollowTargetAim, RotationComposerAim, VirtualCamera, blend_exports as blend, CameraState_exports as cameraState, consumedInput_exports as consumedInput, damping_exports as damping, debugZones_exports as debugZones, follow_exports as follow, groupFraming_exports as groupFraming, hardLockToTarget_exports as hardLockToTarget, hardLookAt_exports as hardLookAt, hasBlendHint, impulseField, impulseListener_exports as impulseListener, impulses_exports as impulses, axis_exports as inputAxis, inputMapping_exports as inputMapping, isInputAxisOwner, klippState_exports as klippState, lens_exports as lens, orbitFollow_exports as orbitFollow, panTilt_exports as panTilt, perlinNoise_exports as perlinNoise, positionComposer_exports as positionComposer, predictor_exports as predictor, rotateWithFollowTarget_exports as rotateWithFollowTarget, rotationComposer_exports as rotationComposer, TargetExtent_exports as targetExtent, TargetPose_exports as targetPose, threeRing_exports as threeRing, tracker_exports as tracker };
@@ -0,0 +1,29 @@
1
+ import * as damping from '../damping/damping.js';
2
+ import type { DampingConstant } from '../damping/damping.js';
3
+ import type { InputAxisData, InputAxisParams, InputAxisRecentering } from './axis.js';
4
+ /** Shapes an input value with range, wrapping, damping, and recentering. */
5
+ export declare class InputAxis implements InputAxisData {
6
+ value: number;
7
+ center: number;
8
+ range: [number, number] | null;
9
+ wrap: boolean;
10
+ recentering: InputAxisRecentering;
11
+ damping: DampingConstant;
12
+ maxSpeed: number;
13
+ autoNormalize: boolean;
14
+ held: boolean;
15
+ rawValue: number;
16
+ idleTime: number;
17
+ hadDelta: boolean;
18
+ readonly damper: damping.DamperState;
19
+ constructor(options?: Partial<InputAxisParams>);
20
+ applyDelta: (delta: number) => void;
21
+ /** Jump straight to `value`, without easing and without counting as input. */
22
+ setValue: (value: number) => void;
23
+ /** Advance the axis and apply damping or recentering. Returns `true` while it still has to move. */
24
+ update: (dt: number) => boolean;
25
+ /** Reset damping so the next update snaps to the raw value. */
26
+ reset: () => void;
27
+ /** Wrap `value` and `rawValue` back into `range`. */
28
+ normalize: () => void;
29
+ }
@@ -0,0 +1,28 @@
1
+ import { createState, damp } from "../damping/damping.js";
2
+ import { applyDelta, createParams, normalize, reset, setValue, update } from "./axis.js";
3
+ //#region src/core/input/InputAxis.ts
4
+ /** Shapes an input value with range, wrapping, damping, and recentering. */
5
+ var InputAxis = class {
6
+ held = false;
7
+ rawValue;
8
+ idleTime = 0;
9
+ hadDelta = false;
10
+ damper = createState();
11
+ constructor(options) {
12
+ Object.assign(this, createParams(options));
13
+ this.rawValue = this.value;
14
+ this.damper.value = this.value;
15
+ damp(this.damper, this.value, 0, 0);
16
+ }
17
+ applyDelta = (delta) => applyDelta(this, delta);
18
+ /** Jump straight to `value`, without easing and without counting as input. */
19
+ setValue = (value) => setValue(this, value);
20
+ /** Advance the axis and apply damping or recentering. Returns `true` while it still has to move. */
21
+ update = (dt) => update(this, dt);
22
+ /** Reset damping so the next update snaps to the raw value. */
23
+ reset = () => reset(this);
24
+ /** Wrap `value` and `rawValue` back into `range`. */
25
+ normalize = () => normalize(this);
26
+ };
27
+ //#endregion
28
+ export { InputAxis };
@@ -0,0 +1,6 @@
1
+ import type { InputAxisData } from './axis.js';
2
+ /** A camera piece exposing named axes for input to drive. */
3
+ export type InputAxisOwner = {
4
+ readonly inputAxes: Record<string, InputAxisData>;
5
+ };
6
+ export declare const isInputAxisOwner: (value: object) => value is InputAxisOwner;
@@ -0,0 +1,4 @@
1
+ //#region src/core/input/InputAxisOwner.ts
2
+ var isInputAxisOwner = (value) => "inputAxes" in value && typeof value.inputAxes === "object" && value.inputAxes !== null;
3
+ //#endregion
4
+ export { isInputAxisOwner };
@@ -0,0 +1,15 @@
1
+ import type { ConsumedInput } from './consumedInput.js';
2
+ import type { InputControllerConfig } from './inputMapping.js';
3
+ /** Maps per-frame input onto axes. Layers override `readInput`. */
4
+ export declare class InputController {
5
+ config: InputControllerConfig;
6
+ /** Whether input deltas are applied to the configured axes. */
7
+ enabled: boolean;
8
+ /** This frame's input. */
9
+ readonly input: ConsumedInput;
10
+ constructor(config: InputControllerConfig);
11
+ /** Feeds every configured source's shaped delta and hold state into its axes. */
12
+ update: () => void;
13
+ /** This frame's input, read from wherever the layer gets it. */
14
+ protected readInput(): ConsumedInput;
15
+ }
@@ -0,0 +1,24 @@
1
+ import { create } from "./consumedInput.js";
2
+ import { feedAxes } from "./inputMapping.js";
3
+ //#region src/core/input/InputController.ts
4
+ /** Maps per-frame input onto axes. Layers override `readInput`. */
5
+ var InputController = class {
6
+ config;
7
+ /** Whether input deltas are applied to the configured axes. */
8
+ enabled = true;
9
+ /** This frame's input. */
10
+ input = create();
11
+ constructor(config) {
12
+ this.config = config;
13
+ }
14
+ /** Feeds every configured source's shaped delta and hold state into its axes. */
15
+ update = () => {
16
+ feedAxes(this.config, this.readInput(), this.enabled);
17
+ };
18
+ /** This frame's input, read from wherever the layer gets it. */
19
+ readInput() {
20
+ return this.input;
21
+ }
22
+ };
23
+ //#endregion
24
+ export { InputController };
@@ -0,0 +1,52 @@
1
+ import type { DamperState, DampingConstant } from '../damping/damping.js';
2
+ export type InputAxisRecentering = {
3
+ enabled: boolean;
4
+ /** Seconds of no delta/hold before recentering starts. */
5
+ wait: number;
6
+ /** Seconds to ease back to `center` once recentering starts. */
7
+ time: number;
8
+ };
9
+ /** An input axis's settings. */
10
+ export type InputAxisParams = {
11
+ /** The current value. */
12
+ value: number;
13
+ /** The value `recentering` returns to. */
14
+ center: number;
15
+ /** `[min, max]` limits, or `null` for none. */
16
+ range: [number, number] | null;
17
+ /** Loop around at the edges of `range` instead of stopping. */
18
+ wrap: boolean;
19
+ /** Return to `center` after a while without input. */
20
+ recentering: InputAxisRecentering;
21
+ /** Response time to the input. */
22
+ damping: DampingConstant;
23
+ /** Maximum change per second. */
24
+ maxSpeed: number;
25
+ /** Whether to normalize a wrapped axis after it settles. */
26
+ autoNormalize: boolean;
27
+ };
28
+ /** Every setting from `settings`, or its default. */
29
+ export declare const createParams: (settings?: Partial<InputAxisParams>) => InputAxisParams;
30
+ /** An input axis as plain data: settings plus the state the functions below advance. */
31
+ export type InputAxisData = InputAxisParams & {
32
+ /** Whether the input source is currently held. */
33
+ held: boolean;
34
+ /** Target the value eases toward. Internal. */
35
+ rawValue: number;
36
+ /** Seconds without input. Internal. */
37
+ idleTime: number;
38
+ /** Whether a delta arrived since the last update. Internal. */
39
+ hadDelta: boolean;
40
+ /** Internal. */
41
+ damper: DamperState;
42
+ };
43
+ /** Add an input delta to the axis target. */
44
+ export declare function applyDelta(axis: InputAxisData, delta: number): void;
45
+ /** Jump straight to `value`, without easing and without counting as input. */
46
+ export declare function setValue(axis: InputAxisData, value: number): void;
47
+ /** Wrap `value` and `rawValue` back into `range`. */
48
+ export declare function normalize(axis: InputAxisData): void;
49
+ /** Advance the axis and apply damping or recentering. Returns `true` while it still has to move. */
50
+ export declare function update(axis: InputAxisData, dt: number): boolean;
51
+ /** Reset damping so the next update snaps to the raw value. */
52
+ export declare function reset(axis: InputAxisData): void;
@@ -0,0 +1,89 @@
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
+ import { damp, reset as reset$1 } from "../damping/damping.js";
3
+ import { withDefaults } from "../params.js";
4
+ import { shortestWrappedDelta } from "./shortestWrappedDelta.js";
5
+ import { clamp, repeat } from "math";
6
+ //#region src/core/input/axis.ts
7
+ var axis_exports = /* @__PURE__ */ __exportAll({
8
+ applyDelta: () => applyDelta,
9
+ createParams: () => createParams,
10
+ normalize: () => normalize,
11
+ reset: () => reset,
12
+ setValue: () => setValue,
13
+ update: () => update
14
+ });
15
+ /** Every setting from `settings`, or its default. */
16
+ var createParams = (settings) => withDefaults({
17
+ value: 0,
18
+ center: 0,
19
+ range: null,
20
+ wrap: false,
21
+ recentering: {
22
+ enabled: false,
23
+ wait: 1,
24
+ time: 1
25
+ },
26
+ damping: 0,
27
+ maxSpeed: Infinity,
28
+ autoNormalize: false
29
+ }, settings);
30
+ var clampToRange = (axis, value) => axis.range ? clamp(value, axis.range[0], axis.range[1]) : value;
31
+ /** Add an input delta to the axis target. */
32
+ function applyDelta(axis, delta) {
33
+ if (delta === 0) return;
34
+ axis.rawValue = axis.wrap ? axis.rawValue + delta : clampToRange(axis, axis.rawValue + delta);
35
+ axis.idleTime = 0;
36
+ axis.hadDelta = true;
37
+ }
38
+ /** Jump straight to `value`, without easing and without counting as input. */
39
+ function setValue(axis, value) {
40
+ const next = axis.wrap ? value : clampToRange(axis, value);
41
+ axis.value = next;
42
+ axis.rawValue = next;
43
+ axis.damper.velocity = 0;
44
+ axis.damper.previousDistance = 0;
45
+ }
46
+ /** Wrap `value` and `rawValue` back into `range`. */
47
+ function normalize(axis) {
48
+ if (!axis.wrap || !axis.range) return;
49
+ const [min, max] = axis.range;
50
+ const span = max - min;
51
+ axis.value = min + repeat(axis.value - min, span);
52
+ axis.rawValue = min + repeat(axis.rawValue - min, span);
53
+ }
54
+ /** Whether the axis still has to move: easing toward its target, or a recentering yet to finish. */
55
+ function isMoving(axis) {
56
+ if (axis.value !== axis.rawValue) return true;
57
+ if (axis.held || !axis.recentering.enabled) return false;
58
+ const offCenter = axis.wrap && axis.range ? shortestWrappedDelta(axis.value, axis.center, axis.range) : axis.center - axis.value;
59
+ return Math.abs(offCenter) > 1e-9;
60
+ }
61
+ /** Advance the axis and apply damping or recentering. Returns `true` while it still has to move. */
62
+ function update(axis, dt) {
63
+ const active = axis.held || axis.hadDelta;
64
+ axis.hadDelta = false;
65
+ if (active) axis.idleTime = 0;
66
+ else axis.idleTime += dt;
67
+ const isRecentering = !active && axis.recentering.enabled && axis.idleTime >= axis.recentering.wait;
68
+ let dampTarget;
69
+ let dampTime;
70
+ if (isRecentering) {
71
+ dampTarget = axis.wrap && axis.range ? axis.value + shortestWrappedDelta(axis.value, axis.center, axis.range) : axis.center;
72
+ dampTime = axis.recentering.time;
73
+ } else {
74
+ dampTarget = axis.rawValue;
75
+ dampTime = axis.damping;
76
+ }
77
+ axis.damper.value = axis.value;
78
+ const eased = damp(axis.damper, dampTarget, dampTime, dt, axis.maxSpeed).value;
79
+ axis.value = axis.wrap ? eased : clampToRange(axis, eased);
80
+ if (isRecentering) axis.rawValue = axis.value;
81
+ if (axis.autoNormalize && axis.value === axis.rawValue) normalize(axis);
82
+ return isMoving(axis);
83
+ }
84
+ /** Reset damping so the next update snaps to the raw value. */
85
+ function reset(axis) {
86
+ reset$1(axis.damper);
87
+ }
88
+ //#endregion
89
+ export { applyDelta, axis_exports, createParams, normalize, reset, setValue, update };
@@ -0,0 +1,37 @@
1
+ /** Input gathered since the last frame, as plain numbers. */
2
+ export type ConsumedInput = {
3
+ leftDx: number;
4
+ leftDy: number;
5
+ middleDx: number;
6
+ middleDy: number;
7
+ rightDx: number;
8
+ rightDy: number;
9
+ /** Single-finger touch movement. */
10
+ touchOneDx: number;
11
+ touchOneDy: number;
12
+ /** Two-finger centroid movement. */
13
+ touchTwoDx: number;
14
+ touchTwoDy: number;
15
+ /** Three-finger centroid movement. */
16
+ touchThreeDx: number;
17
+ touchThreeDy: number;
18
+ /** Two-finger twist in radians. */
19
+ touchRotateDelta: number;
20
+ /** Pinch with two fingers or on a trackpad, as the change in `ln(scale)`. Spreading is positive. */
21
+ pinchDelta: number;
22
+ /** Wheel scrolling in pixels, as the browser reports it: right and down are positive. */
23
+ wheelDeltaX: number;
24
+ wheelDeltaY: number;
25
+ /** Raw mouse movement while Pointer Lock is active and no button is held. */
26
+ lockedDx: number;
27
+ lockedDy: number;
28
+ /** Current hold state for the source. */
29
+ leftHeld: boolean;
30
+ middleHeld: boolean;
31
+ rightHeld: boolean;
32
+ touchOneHeld: boolean;
33
+ touchTwoHeld: boolean;
34
+ touchThreeHeld: boolean;
35
+ };
36
+ /** Reusable zero-valued input buffer. */
37
+ export declare function create(): ConsumedInput;
@@ -0,0 +1,34 @@
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
+ //#region src/core/input/consumedInput.ts
3
+ var consumedInput_exports = /* @__PURE__ */ __exportAll({ create: () => create });
4
+ /** Reusable zero-valued input buffer. */
5
+ function create() {
6
+ return {
7
+ leftDx: 0,
8
+ leftDy: 0,
9
+ middleDx: 0,
10
+ middleDy: 0,
11
+ rightDx: 0,
12
+ rightDy: 0,
13
+ touchOneDx: 0,
14
+ touchOneDy: 0,
15
+ touchTwoDx: 0,
16
+ touchTwoDy: 0,
17
+ touchThreeDx: 0,
18
+ touchThreeDy: 0,
19
+ touchRotateDelta: 0,
20
+ pinchDelta: 0,
21
+ wheelDeltaX: 0,
22
+ wheelDeltaY: 0,
23
+ lockedDx: 0,
24
+ lockedDy: 0,
25
+ leftHeld: false,
26
+ middleHeld: false,
27
+ rightHeld: false,
28
+ touchOneHeld: false,
29
+ touchTwoHeld: false,
30
+ touchThreeHeld: false
31
+ };
32
+ }
33
+ //#endregion
34
+ export { consumedInput_exports, create };
@@ -0,0 +1,9 @@
1
+ export { InputAxis } from './InputAxis.js';
2
+ export { isInputAxisOwner, type InputAxisOwner } from './InputAxisOwner.js';
3
+ export * as inputAxis from './axis.js';
4
+ export type { InputAxisData, InputAxisParams, InputAxisRecentering } from './axis.js';
5
+ export * as consumedInput from './consumedInput.js';
6
+ export type { ConsumedInput } from './consumedInput.js';
7
+ export { InputController } from './InputController.js';
8
+ export * as inputMapping from './inputMapping.js';
9
+ export type { InputAxisMapping, InputAxisPair, InputControllerConfig, InputInvert, InputSourceMapping, } from './inputMapping.js';