@woosh/meep-engine 3.35.0 → 3.37.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.
- package/package.json +1 -1
- package/src/engine/Engine.d.ts +2 -0
- package/src/engine/Engine.d.ts.map +1 -1
- package/src/engine/Engine.js +5 -1
- package/src/engine/input/devices/XRInputDevice.d.ts +91 -0
- package/src/engine/input/devices/XRInputDevice.d.ts.map +1 -0
- package/src/engine/input/devices/XRInputDevice.js +479 -0
- package/src/engine/input/devices/xr/XRGamepadMapping.d.ts +14 -0
- package/src/engine/input/devices/xr/XRGamepadMapping.d.ts.map +1 -0
- package/src/engine/input/devices/xr/XRGamepadMapping.js +9 -0
- package/src/engine/input/devices/xr/XRHandedness.d.ts +15 -0
- package/src/engine/input/devices/xr/XRHandedness.d.ts.map +1 -0
- package/src/engine/input/devices/xr/XRHandedness.js +10 -0
- package/src/engine/input/devices/xr/XRInputAction.d.ts +50 -0
- package/src/engine/input/devices/xr/XRInputAction.d.ts.map +1 -0
- package/src/engine/input/devices/xr/XRInputAction.js +116 -0
- package/src/engine/input/devices/xr/XRInputButton.d.ts +26 -0
- package/src/engine/input/devices/xr/XRInputButton.d.ts.map +1 -0
- package/src/engine/input/devices/xr/XRInputButton.js +53 -0
- package/src/engine/input/devices/xr/XRInputCoordinates.d.ts +23 -0
- package/src/engine/input/devices/xr/XRInputCoordinates.d.ts.map +1 -0
- package/src/engine/input/devices/xr/XRInputCoordinates.js +35 -0
- package/src/engine/input/devices/xr/XRInputHandle.d.ts +93 -0
- package/src/engine/input/devices/xr/XRInputHandle.d.ts.map +1 -0
- package/src/engine/input/devices/xr/XRInputHandle.js +268 -0
- package/src/engine/input/devices/xr/XRInputPose.d.ts +59 -0
- package/src/engine/input/devices/xr/XRInputPose.d.ts.map +1 -0
- package/src/engine/input/devices/xr/XRInputPose.js +77 -0
- package/src/engine/input/devices/xr/XRInputTypes.d.ts +76 -0
- package/src/engine/input/devices/xr/XRInputTypes.d.ts.map +1 -0
- package/src/engine/input/devices/xr/XRInputTypes.js +31 -0
- package/src/engine/input/devices/xr/XRInputValueSource.d.ts +11 -0
- package/src/engine/input/devices/xr/XRInputValueSource.d.ts.map +1 -0
- package/src/engine/input/devices/xr/XRInputValueSource.js +11 -0
- package/src/engine/input/devices/xr/XRTargetRayMode.d.ts +17 -0
- package/src/engine/input/devices/xr/XRTargetRayMode.d.ts.map +1 -0
- package/src/engine/input/devices/xr/XRTargetRayMode.js +12 -0
- package/src/engine/input/devices/xr/XRVisibilityState.d.ts +15 -0
- package/src/engine/input/devices/xr/XRVisibilityState.d.ts.map +1 -0
- package/src/engine/input/devices/xr/XRVisibilityState.js +10 -0
- package/src/engine/input/ecs/ism/coordinate/InputCoordinateChannel.d.ts +15 -1
- package/src/engine/input/ecs/ism/coordinate/InputCoordinateChannel.d.ts.map +1 -1
- package/src/engine/input/ecs/ism/coordinate/InputCoordinateChannel.js +9 -0
- package/src/engine/input/ecs/ism/coordinate/InputCoordinateDevice.d.ts +17 -4
- package/src/engine/input/ecs/ism/coordinate/InputCoordinateDevice.d.ts.map +1 -1
- package/src/engine/input/ecs/ism/coordinate/InputCoordinateDevice.js +26 -0
- package/src/engine/input/ecs/ism/coordinate/InputCoordinateSwitches.d.ts +17 -2
- package/src/engine/input/ecs/ism/coordinate/InputCoordinateSwitches.d.ts.map +1 -1
- package/src/engine/input/ecs/ism/device/GamepadInputDeviceAdapter.d.ts +5 -0
- package/src/engine/input/ecs/ism/device/GamepadInputDeviceAdapter.d.ts.map +1 -1
- package/src/engine/input/ecs/ism/device/InputDeviceAdapter.d.ts +2 -0
- package/src/engine/input/ecs/ism/device/InputDeviceAdapter.d.ts.map +1 -1
- package/src/engine/input/ecs/ism/device/InputDeviceAdapter.js +2 -0
- package/src/engine/input/ecs/ism/device/KeyboardInputDeviceAdapter.d.ts +7 -0
- package/src/engine/input/ecs/ism/device/KeyboardInputDeviceAdapter.d.ts.map +1 -1
- package/src/engine/input/ecs/ism/device/ManualInputDeviceAdapter.d.ts +5 -0
- package/src/engine/input/ecs/ism/device/ManualInputDeviceAdapter.d.ts.map +1 -1
- package/src/engine/input/ecs/ism/device/PointerInputDeviceAdapter.d.ts +5 -0
- package/src/engine/input/ecs/ism/device/PointerInputDeviceAdapter.d.ts.map +1 -1
- package/src/engine/input/ecs/ism/device/XRInputDeviceAdapter.d.ts +30 -0
- package/src/engine/input/ecs/ism/device/XRInputDeviceAdapter.d.ts.map +1 -0
- package/src/engine/input/ecs/ism/device/XRInputDeviceAdapter.js +87 -0
- package/src/engine/input/ecs/ism/device/XR_INPUT_DEVICE_IDS.d.ts +15 -0
- package/src/engine/input/ecs/ism/device/XR_INPUT_DEVICE_IDS.d.ts.map +1 -0
- package/src/engine/input/ecs/ism/device/XR_INPUT_DEVICE_IDS.js +22 -0
- package/src/engine/input/ecs/ism/trigger/InputTrigger.d.ts +11 -1
- package/src/engine/input/ecs/ism/trigger/InputTrigger.d.ts.map +1 -1
- package/src/engine/input/ecs/ism/trigger/InputTrigger.js +7 -0
- package/src/engine/input/ecs/ism/trigger/InputTriggerChord.d.ts +16 -2
- package/src/engine/input/ecs/ism/trigger/InputTriggerChord.d.ts.map +1 -1
- package/src/engine/input/ecs/ism/trigger/InputTriggerHold.d.ts +22 -2
- package/src/engine/input/ecs/ism/trigger/InputTriggerHold.d.ts.map +1 -1
- package/src/engine/input/ecs/ism/trigger/InputTriggerRelease.d.ts +16 -2
- package/src/engine/input/ecs/ism/trigger/InputTriggerRelease.d.ts.map +1 -1
- package/src/engine/input/ecs/ism/trigger/InputTriggerSequence.d.ts +24 -4
- package/src/engine/input/ecs/ism/trigger/InputTriggerSequence.d.ts.map +1 -1
- package/src/engine/input/ecs/ism/trigger/InputTriggerSwitch.d.ts +6 -8
- package/src/engine/input/ecs/ism/trigger/InputTriggerSwitch.d.ts.map +1 -1
- package/src/engine/input/ecs/ism/trigger/InputTriggerSwitch.js +5 -0
- package/src/engine/input/ecs/ism/trigger/InputTriggerXRButton.d.ts +15 -0
- package/src/engine/input/ecs/ism/trigger/InputTriggerXRButton.d.ts.map +1 -0
- package/src/engine/input/ecs/ism/trigger/InputTriggerXRButton.js +25 -0
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/shade/renderer/animation/chunk_pose_accumulator.js +14 -24
- package/src/shade/renderer/animation/skinning/bounds_refresh/shader_meshlet_bounds_reduce.js +16 -15
- package/src/shade/renderer/deferred/indirect/chunk_lpv_sample_light.js +1 -1
- package/src/shade/renderer/gpu_primitive/bvh/GPU_BVH_BUILD_PLAN.md +1123 -1122
- package/src/shade/renderer/gpu_primitive/bvh/PHASE1_HANDOVER.md +202 -201
- package/src/shade/renderer/light/environment/chunk_roughness_to_mip_ratio.js +24 -0
- package/src/shade/renderer/light/environment/chunk_sphere_probe_roughness_to_lod.js +2 -25
- package/src/shade/renderer/light/environment/shader_project_environment_sh.d.ts +2 -2
- package/src/shade/renderer/light/environment/shader_project_environment_sh.d.ts.map +1 -1
- package/src/shade/renderer/light/environment/shader_project_environment_sh.js +50 -19
- package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
- package/src/shade/renderer/particles/DESIGN.md +1 -1
- package/src/shade/renderer/particles/bounds/chunk_particle_bounds.js +10 -9
- package/src/shade/renderer/scene/shader_bvh_extract_instance_leaves.js +10 -8
- package/src/shade/renderer/shader/chunk/atomic/chunk_atomic_add_f32_storage.js +25 -0
- package/src/shade/renderer/shader/chunk/atomic/chunk_atomic_max_f32_storage.js +28 -0
- package/src/shade/renderer/shader/chunk/atomic/chunk_atomic_min_f32_storage.js +28 -0
- package/src/shade/renderer/shader/chunk/geometry/plane/{plane_ray_raycast.js → chunk_plane_ray_raycast.js} +1 -1
- package/src/shade/renderer/shadow/map/csm/shader/shader_csm_caster_range.js +3 -3
- package/src/shade/renderer/animation/skinning/bounds_refresh/chunk_aabb_atomic_f32.js +0 -59
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {import('../InputSourceTable.js').InputSourceTable} InputSourceTable
|
|
3
|
+
* @typedef {import('../device/InputDeviceAdapter.js').InputDeviceAdapter} InputDeviceAdapter
|
|
4
|
+
* @typedef {import('../../../../../core/binary/BitSet.js').BitSet} BitSet
|
|
5
|
+
*/
|
|
1
6
|
/**
|
|
2
7
|
* A channel read straight from a device.
|
|
3
8
|
*
|
|
@@ -23,6 +28,15 @@ export class InputCoordinateDevice extends InputCoordinateChannel {
|
|
|
23
28
|
* @returns {InputCoordinateDevice}
|
|
24
29
|
*/
|
|
25
30
|
static fromGamepad(code: number): InputCoordinateDevice;
|
|
31
|
+
/**
|
|
32
|
+
* Select/squeeze and raw buttons/axes are scalar; thumbstick/touchpad have two components.
|
|
33
|
+
* Missing hardware reads zero. Named sticks require xr-standard; raw axes retain native ordering.
|
|
34
|
+
*
|
|
35
|
+
* @param {'left'|'right'|'none'} handedness
|
|
36
|
+
* @param {number} code A value from XRInputCoordinates, xr_input_button_coordinate or xr_input_axis_coordinate.
|
|
37
|
+
* @returns {InputCoordinateDevice}
|
|
38
|
+
*/
|
|
39
|
+
static fromXR(handedness: 'left' | 'right' | 'none', code: number): InputCoordinateDevice;
|
|
26
40
|
/**
|
|
27
41
|
* A pointer channel. `position` is 2-D absolute; `move` is 2-D and `wheel` is 3-D, both relative and
|
|
28
42
|
* both LATCHED once per frame - a reader sees the total that arrived since the previous frame, and sees
|
|
@@ -36,16 +50,15 @@ export class InputCoordinateDevice extends InputCoordinateChannel {
|
|
|
36
50
|
* @type {InputCoordinateSource}
|
|
37
51
|
*/
|
|
38
52
|
source: InputCoordinateSource;
|
|
39
|
-
/**
|
|
40
|
-
* @returns {InputCoordinateChannelType}
|
|
41
|
-
*/
|
|
42
|
-
get type(): number;
|
|
43
53
|
/**
|
|
44
54
|
* @returns {InputCoordinateDevice}
|
|
45
55
|
*/
|
|
46
56
|
clone(): InputCoordinateDevice;
|
|
47
57
|
#private;
|
|
48
58
|
}
|
|
59
|
+
export type InputSourceTable = import('../InputSourceTable.js').InputSourceTable;
|
|
60
|
+
export type InputDeviceAdapter = import('../device/InputDeviceAdapter.js').InputDeviceAdapter;
|
|
61
|
+
export type BitSet = import('../../../../../core/binary/BitSet.js').BitSet;
|
|
49
62
|
import { InputCoordinateChannel } from "./InputCoordinateChannel.js";
|
|
50
63
|
import { InputCoordinateSource } from "../InputCoordinateSource.js";
|
|
51
64
|
//# sourceMappingURL=InputCoordinateDevice.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputCoordinateDevice.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/coordinate/InputCoordinateDevice.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InputCoordinateDevice.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/coordinate/InputCoordinateDevice.js"],"names":[],"mappings":"AAaA;;;;GAIG;AAEH;;;;;;;;;;;GAWG;AACH;IA2BI;;;OAGG;IACH,0BAHW,qBAAqB,GACnB,qBAAqB,CAUjC;IAED;;;;;OAKG;IACH,yBAHW,MAAM,GACJ,qBAAqB,CAQjC;IAED;;;;;;;OAOG;IACH,0BAJW,MAAM,GAAC,OAAO,GAAC,MAAM,QACrB,MAAM,GACJ,qBAAqB,CAUjC;IAED;;;;;;;OAOG;IACH,yBAHW,MAAM,GACJ,qBAAqB,CAajC;IA1FD;;OAEG;IACH,QAFU,qBAAqB,CAEM;IAwHrC;;OAEG;IACH,SAFa,qBAAqB,CAIjC;;CAiBJ;+BApKY,OAAO,wBAAwB,EAAE,gBAAgB;iCACjD,OAAO,iCAAiC,EAAE,kBAAkB;qBAC5D,OAAO,sCAAsC,EAAE,MAAM;uCAP3B,6BAA6B;sCAD9B,6BAA6B"}
|
|
@@ -3,12 +3,20 @@ import { GamepadCoordinates } from "../../../devices/gamepad/GamepadCoordinates.
|
|
|
3
3
|
import { PointerCoordinates } from "../../../devices/PointerCoordinates.js";
|
|
4
4
|
import { GAMEPAD_INPUT_DEVICE_ID } from "../device/GAMEPAD_INPUT_DEVICE_ID.js";
|
|
5
5
|
import { POINTER_INPUT_DEVICE_ID } from "../device/POINTER_INPUT_DEVICE_ID.js";
|
|
6
|
+
import { xr_input_device_id } from "../device/XR_INPUT_DEVICE_IDS.js";
|
|
7
|
+
import { XRInputCoordinates } from "../../../devices/xr/XRInputCoordinates.js";
|
|
6
8
|
import { InputCoordinateKind } from "../InputCoordinateKind.js";
|
|
7
9
|
import { InputCoordinateSource } from "../InputCoordinateSource.js";
|
|
8
10
|
import { InputCoordinateChannel } from "./InputCoordinateChannel.js";
|
|
9
11
|
import { InputCoordinateChannelType } from "./InputCoordinateChannelType.js";
|
|
10
12
|
import { hash_mix2 } from "../../../../../core/math/hash/hash_mix2.js";
|
|
11
13
|
|
|
14
|
+
/**
|
|
15
|
+
* @typedef {import('../InputSourceTable.js').InputSourceTable} InputSourceTable
|
|
16
|
+
* @typedef {import('../device/InputDeviceAdapter.js').InputDeviceAdapter} InputDeviceAdapter
|
|
17
|
+
* @typedef {import('../../../../../core/binary/BitSet.js').BitSet} BitSet
|
|
18
|
+
*/
|
|
19
|
+
|
|
12
20
|
/**
|
|
13
21
|
* A channel read straight from a device.
|
|
14
22
|
*
|
|
@@ -76,6 +84,24 @@ export class InputCoordinateDevice extends InputCoordinateChannel {
|
|
|
76
84
|
));
|
|
77
85
|
}
|
|
78
86
|
|
|
87
|
+
/**
|
|
88
|
+
* Select/squeeze and raw buttons/axes are scalar; thumbstick/touchpad have two components.
|
|
89
|
+
* Missing hardware reads zero. Named sticks require xr-standard; raw axes retain native ordering.
|
|
90
|
+
*
|
|
91
|
+
* @param {'left'|'right'|'none'} handedness
|
|
92
|
+
* @param {number} code A value from XRInputCoordinates, xr_input_button_coordinate or xr_input_axis_coordinate.
|
|
93
|
+
* @returns {InputCoordinateDevice}
|
|
94
|
+
*/
|
|
95
|
+
static fromXR(handedness, code) {
|
|
96
|
+
assert.isNonNegativeInteger(code, 'code');
|
|
97
|
+
|
|
98
|
+
const dimensions = code === XRInputCoordinates.thumbstick || code === XRInputCoordinates.touchpad ? 2 : 1;
|
|
99
|
+
|
|
100
|
+
return InputCoordinateDevice.fromSource(InputCoordinateSource.from(
|
|
101
|
+
xr_input_device_id(handedness), code, dimensions, InputCoordinateKind.Normalized
|
|
102
|
+
));
|
|
103
|
+
}
|
|
104
|
+
|
|
79
105
|
/**
|
|
80
106
|
* A pointer channel. `position` is 2-D absolute; `move` is 2-D and `wheel` is 3-D, both relative and
|
|
81
107
|
* both LATCHED once per frame - a reader sees the total that arrived since the previous frame, and sees
|
|
@@ -29,9 +29,24 @@ export class InputCoordinateSwitches extends InputCoordinateChannel {
|
|
|
29
29
|
*/
|
|
30
30
|
triggers: InputTrigger[];
|
|
31
31
|
/**
|
|
32
|
-
* @
|
|
32
|
+
* @param {InputSourceTable} table
|
|
33
|
+
* @param {Map<string, InputDeviceAdapter>} adapters
|
|
33
34
|
*/
|
|
34
|
-
|
|
35
|
+
resolve(table: InputSourceTable, adapters: Map<string, InputDeviceAdapter>): void;
|
|
36
|
+
/**
|
|
37
|
+
* @param {InputSource[]} result
|
|
38
|
+
*/
|
|
39
|
+
collectSources(result: InputSource[]): void;
|
|
40
|
+
/**
|
|
41
|
+
* @param {InputTrigger[]} result
|
|
42
|
+
*/
|
|
43
|
+
collectStateful(result: InputTrigger[]): void;
|
|
44
|
+
/**
|
|
45
|
+
* @param {number[]|Float64Array} result
|
|
46
|
+
* @param {number} offset
|
|
47
|
+
* @param {BitSet} held
|
|
48
|
+
*/
|
|
49
|
+
read(result: number[] | Float64Array, offset: number, held: BitSet): void;
|
|
35
50
|
/**
|
|
36
51
|
* @returns {InputCoordinateSwitches}
|
|
37
52
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputCoordinateSwitches.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/coordinate/InputCoordinateSwitches.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;GAkBG;AACH;IAsBI;;;OAGG;IACH,sBAHW,cAAc,GACZ,uBAAuB,CAYnC;IAlCD;;;OAGG;IACH,UAFU,cAAc,CAEV;
|
|
1
|
+
{"version":3,"file":"InputCoordinateSwitches.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/coordinate/InputCoordinateSwitches.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;GAkBG;AACH;IAsBI;;;OAGG;IACH,sBAHW,cAAc,GACZ,uBAAuB,CAYnC;IAlCD;;;OAGG;IACH,UAFU,cAAc,CAEV;IAgCd;;;OAGG;IACH,2CAFW,IAAI,MAAM,qBAAqB,QAQzC;IAED;;OAEG;IACH,uBAFW,aAAa,QAQvB;IAED;;OAEG;IACH,wBAFW,cAAc,QAQxB;IAED;;;;OAIG;IACH,aAJW,MAAM,EAAE,GAAC,YAAY,UACrB,MAAM,sBAahB;IAED;;OAEG;IACH,SAFa,uBAAuB,CAInC;CAyCJ;uCA9JsC,6BAA6B"}
|
|
@@ -16,6 +16,11 @@ export class GamepadInputDeviceAdapter extends InputDeviceAdapter {
|
|
|
16
16
|
* @param {GamepadDevice} device
|
|
17
17
|
*/
|
|
18
18
|
constructor(device: GamepadDevice);
|
|
19
|
+
/**
|
|
20
|
+
* @param {number} code a {@link GamepadButtons} value
|
|
21
|
+
* @returns {InputDeviceSwitch}
|
|
22
|
+
*/
|
|
23
|
+
getSwitch(code: number): InputDeviceSwitch;
|
|
19
24
|
#private;
|
|
20
25
|
}
|
|
21
26
|
import { InputDeviceAdapter } from "./InputDeviceAdapter.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GamepadInputDeviceAdapter.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/device/GamepadInputDeviceAdapter.js"],"names":[],"mappings":"AAaA;;;;;;;;;;;;GAYG;AACH;IASI;;OAEG;IACH,mCAMC;;
|
|
1
|
+
{"version":3,"file":"GamepadInputDeviceAdapter.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/device/GamepadInputDeviceAdapter.js"],"names":[],"mappings":"AAaA;;;;;;;;;;;;GAYG;AACH;IASI;;OAEG;IACH,mCAMC;IAED;;;OAGG;IACH,gBAHW,MAAM,qBAKhB;;CAmCJ;mCAlFkC,yBAAyB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** @typedef {import('../../../devices/InputDeviceSwitch.js').InputDeviceSwitch} InputDeviceSwitch */
|
|
1
2
|
/**
|
|
2
3
|
* Presents a concrete input device to the binding layer as switches and coordinates.
|
|
3
4
|
*
|
|
@@ -54,4 +55,5 @@ export class InputDeviceAdapter {
|
|
|
54
55
|
*/
|
|
55
56
|
latchDeltas(): void;
|
|
56
57
|
}
|
|
58
|
+
export type InputDeviceSwitch = import('../../../devices/InputDeviceSwitch.js').InputDeviceSwitch;
|
|
57
59
|
//# sourceMappingURL=InputDeviceAdapter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputDeviceAdapter.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/device/InputDeviceAdapter.js"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH;IAEI;;;;OAIG;IACH,IAFU,MAAM,CAER;IAER;;;;;;OAMG;IACH,gBAHW,MAAM,
|
|
1
|
+
{"version":3,"file":"InputDeviceAdapter.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/device/InputDeviceAdapter.js"],"names":[],"mappings":"AAAA,qGAAqG;AAErG;;;;;;;;;;GAUG;AACH;IAEI;;;;OAIG;IACH,IAFU,MAAM,CAER;IAER;;;;;;OAMG;IACH,gBAHW,MAAM,GACJ,iBAAiB,CAI7B;IAED;;;;;;OAMG;IACH,uBAJW,MAAM,EAAE,GAAC,YAAY,UACrB,MAAM,QACN,MAAM,QAIhB;IAED;;;OAGG;IACH,gBAEC;IAED;;OAEG;IACH,iBAEC;IAED;;;;;;;;;;OAUG;IACH,oBAEC;CACJ;gCAzEa,OAAO,uCAAuC,EAAE,iBAAiB"}
|
|
@@ -16,6 +16,13 @@ export class KeyboardInputDeviceAdapter extends InputDeviceAdapter {
|
|
|
16
16
|
* @param {KeyboardDevice} device
|
|
17
17
|
*/
|
|
18
18
|
constructor(device: KeyboardDevice);
|
|
19
|
+
/**
|
|
20
|
+
* Precondition: `code` is a member of {@link KeyCodes}.
|
|
21
|
+
*
|
|
22
|
+
* @param {number} code
|
|
23
|
+
* @returns {InputDeviceSwitch}
|
|
24
|
+
*/
|
|
25
|
+
getSwitch(code: number): InputDeviceSwitch;
|
|
19
26
|
#private;
|
|
20
27
|
}
|
|
21
28
|
import { InputDeviceAdapter } from "./InputDeviceAdapter.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyboardInputDeviceAdapter.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/device/KeyboardInputDeviceAdapter.js"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;GAYG;AACH;IASI;;OAEG;IACH,oCAMC;;
|
|
1
|
+
{"version":3,"file":"KeyboardInputDeviceAdapter.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/device/KeyboardInputDeviceAdapter.js"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;GAYG;AACH;IASI;;OAEG;IACH,oCAMC;IAED;;;;;OAKG;IACH,gBAHW,MAAM,qBAShB;;CACJ;mCA5DkC,yBAAyB"}
|
|
@@ -18,6 +18,11 @@ export class ManualInputDeviceAdapter extends InputDeviceAdapter {
|
|
|
18
18
|
* @param {ManualInputDevice} device
|
|
19
19
|
*/
|
|
20
20
|
constructor(id: string, device: ManualInputDevice);
|
|
21
|
+
/**
|
|
22
|
+
* @param {number} code
|
|
23
|
+
* @returns {InputDeviceSwitch}
|
|
24
|
+
*/
|
|
25
|
+
getSwitch(code: number): InputDeviceSwitch;
|
|
21
26
|
#private;
|
|
22
27
|
}
|
|
23
28
|
import { InputDeviceAdapter } from "./InputDeviceAdapter.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManualInputDeviceAdapter.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/device/ManualInputDeviceAdapter.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;GAaG;AACH;IAOI;;;OAGG;IACH,gBAHW,MAAM,6BAWhB;;
|
|
1
|
+
{"version":3,"file":"ManualInputDeviceAdapter.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/device/ManualInputDeviceAdapter.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;GAaG;AACH;IAOI;;;OAGG;IACH,gBAHW,MAAM,6BAWhB;IAED;;;OAGG;IACH,gBAHW,MAAM,qBAKhB;;CAUJ;mCArDkC,yBAAyB"}
|
|
@@ -24,6 +24,11 @@ export class PointerInputDeviceAdapter extends InputDeviceAdapter {
|
|
|
24
24
|
* @param {PointerDevice} device
|
|
25
25
|
*/
|
|
26
26
|
constructor(device: PointerDevice);
|
|
27
|
+
/**
|
|
28
|
+
* @param {number} code a {@link MouseButtons} value
|
|
29
|
+
* @returns {InputDeviceSwitch}
|
|
30
|
+
*/
|
|
31
|
+
getSwitch(code: number): InputDeviceSwitch;
|
|
27
32
|
#private;
|
|
28
33
|
}
|
|
29
34
|
import { InputDeviceAdapter } from "./InputDeviceAdapter.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PointerInputDeviceAdapter.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/device/PointerInputDeviceAdapter.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IAiCI;;OAEG;IACH,mCAMC;;
|
|
1
|
+
{"version":3,"file":"PointerInputDeviceAdapter.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/device/PointerInputDeviceAdapter.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IAiCI;;OAEG;IACH,mCAMC;IA+CD;;;OAGG;IACH,gBAHW,MAAM,qBAShB;;CAkCJ;mCA7JkC,yBAAyB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Exposes one persistent XR handedness slot to {@link InputMapSystem}, including before hardware exists.
|
|
3
|
+
* Use {@link InputTriggerXRButton} for native pressed/touched switches and
|
|
4
|
+
* {@link InputCoordinateDevice.fromXR} for amounts, sticks and axes.
|
|
5
|
+
*
|
|
6
|
+
* Subscribe to select/squeeze completion directly through XRInputAction.completed or an InputController
|
|
7
|
+
* path such as 'xr/right/select/completed'. Button press triggers and action completion are independent.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* // With a running engine and an active scene:
|
|
11
|
+
* const system = new InputMapSystem([new XRInputDeviceAdapter(engine.devices.xr, 'right')]);
|
|
12
|
+
* await engine.entityManager.addSystem(system);
|
|
13
|
+
* const map = new InputMap();
|
|
14
|
+
* map.bindCoordinate('pressure', InputCoordinateDevice.fromXR('right', XRInputCoordinates.select));
|
|
15
|
+
* const entity = engine.entityManager.dataset.createEntity();
|
|
16
|
+
* engine.entityManager.dataset.addComponentToEntity(entity, map);
|
|
17
|
+
* // Read after XRInputDevice.poll in the application's frame callback.
|
|
18
|
+
* const pressure = new Vector1();
|
|
19
|
+
* map.axis1(pressure, 'pressure');
|
|
20
|
+
*/
|
|
21
|
+
export class XRInputDeviceAdapter extends InputDeviceAdapter {
|
|
22
|
+
/**
|
|
23
|
+
* @param {import('../../../devices/XRInputDevice.js').XRInputDevice} device
|
|
24
|
+
* @param {'left'|'right'|'none'} handedness
|
|
25
|
+
*/
|
|
26
|
+
constructor(device: import('../../../devices/XRInputDevice.js').XRInputDevice, handedness: 'left' | 'right' | 'none');
|
|
27
|
+
#private;
|
|
28
|
+
}
|
|
29
|
+
import { InputDeviceAdapter } from "./InputDeviceAdapter.js";
|
|
30
|
+
//# sourceMappingURL=XRInputDeviceAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"XRInputDeviceAdapter.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/device/XRInputDeviceAdapter.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;GAmBG;AACH;IAII;;;OAGG;IACH,oBAHW,OAAO,mCAAmC,EAAE,aAAa,cACzD,MAAM,GAAC,OAAO,GAAC,MAAM,EAU/B;;CA6CJ;mCApFkC,yBAAyB"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { assert } from "../../../../../core/assert.js";
|
|
2
|
+
import { XRInputCoordinates } from "../../../devices/xr/XRInputCoordinates.js";
|
|
3
|
+
import { InputDeviceAdapter } from "./InputDeviceAdapter.js";
|
|
4
|
+
import { xr_input_device_id } from "./XR_INPUT_DEVICE_IDS.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Exposes one persistent XR handedness slot to {@link InputMapSystem}, including before hardware exists.
|
|
8
|
+
* Use {@link InputTriggerXRButton} for native pressed/touched switches and
|
|
9
|
+
* {@link InputCoordinateDevice.fromXR} for amounts, sticks and axes.
|
|
10
|
+
*
|
|
11
|
+
* Subscribe to select/squeeze completion directly through XRInputAction.completed or an InputController
|
|
12
|
+
* path such as 'xr/right/select/completed'. Button press triggers and action completion are independent.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* // With a running engine and an active scene:
|
|
16
|
+
* const system = new InputMapSystem([new XRInputDeviceAdapter(engine.devices.xr, 'right')]);
|
|
17
|
+
* await engine.entityManager.addSystem(system);
|
|
18
|
+
* const map = new InputMap();
|
|
19
|
+
* map.bindCoordinate('pressure', InputCoordinateDevice.fromXR('right', XRInputCoordinates.select));
|
|
20
|
+
* const entity = engine.entityManager.dataset.createEntity();
|
|
21
|
+
* engine.entityManager.dataset.addComponentToEntity(entity, map);
|
|
22
|
+
* // Read after XRInputDevice.poll in the application's frame callback.
|
|
23
|
+
* const pressure = new Vector1();
|
|
24
|
+
* map.axis1(pressure, 'pressure');
|
|
25
|
+
*/
|
|
26
|
+
export class XRInputDeviceAdapter extends InputDeviceAdapter {
|
|
27
|
+
/** @type {import('../../../devices/xr/XRInputHandle.js').XRInputHandle} */
|
|
28
|
+
#handle;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @param {import('../../../devices/XRInputDevice.js').XRInputDevice} device
|
|
32
|
+
* @param {'left'|'right'|'none'} handedness
|
|
33
|
+
*/
|
|
34
|
+
constructor(device, handedness) {
|
|
35
|
+
super();
|
|
36
|
+
|
|
37
|
+
assert.defined(device, 'device');
|
|
38
|
+
assert.notNull(device, 'device');
|
|
39
|
+
|
|
40
|
+
this.id = xr_input_device_id(handedness);
|
|
41
|
+
this.#handle = device[handedness];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @param {number} code Even codes are pressed, odd codes touched; button index is floor(code/2).
|
|
46
|
+
* @returns {import('../../../devices/InputDeviceSwitch.js').InputDeviceSwitch}
|
|
47
|
+
*/
|
|
48
|
+
getSwitch(code) {
|
|
49
|
+
assert.isNonNegativeInteger(code, 'code');
|
|
50
|
+
|
|
51
|
+
const button = this.#handle.getButton(Math.floor(code / 2));
|
|
52
|
+
return code % 2 === 0 ? button.pressed : button.touched;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @param {number[]|Float64Array} result
|
|
57
|
+
* @param {number} offset
|
|
58
|
+
* @param {number} code
|
|
59
|
+
*/
|
|
60
|
+
readCoordinate(result, offset, code) {
|
|
61
|
+
assert.isArrayLike(result, 'result');
|
|
62
|
+
assert.isNonNegativeInteger(offset, 'offset');
|
|
63
|
+
assert.isNonNegativeInteger(code, 'code');
|
|
64
|
+
|
|
65
|
+
const handle = this.#handle;
|
|
66
|
+
switch (code) {
|
|
67
|
+
case XRInputCoordinates.select:
|
|
68
|
+
result[offset] = handle.select.x;
|
|
69
|
+
return;
|
|
70
|
+
case XRInputCoordinates.squeeze:
|
|
71
|
+
result[offset] = handle.squeeze.x;
|
|
72
|
+
return;
|
|
73
|
+
case XRInputCoordinates.thumbstick:
|
|
74
|
+
result[offset] = handle.thumbstick.value.x;
|
|
75
|
+
result[offset + 1] = handle.thumbstick.value.y;
|
|
76
|
+
return;
|
|
77
|
+
case XRInputCoordinates.touchpad:
|
|
78
|
+
result[offset] = handle.touchpad.x;
|
|
79
|
+
result[offset + 1] = handle.touchpad.y;
|
|
80
|
+
return;
|
|
81
|
+
default: {
|
|
82
|
+
const index = Math.floor((code - 4) / 2);
|
|
83
|
+
result[offset] = code % 2 === 0 ? handle.getButton(index).x : handle.getAxis(index).x;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {'left'|'right'|'none'} handedness
|
|
3
|
+
* @returns {string}
|
|
4
|
+
*/
|
|
5
|
+
export function xr_input_device_id(handedness: 'left' | 'right' | 'none'): string;
|
|
6
|
+
/**
|
|
7
|
+
* Stable IDs used in serialized input maps.
|
|
8
|
+
* @readonly
|
|
9
|
+
*/
|
|
10
|
+
export const XR_INPUT_DEVICE_IDS: Readonly<{
|
|
11
|
+
left: "xr-left";
|
|
12
|
+
right: "xr-right";
|
|
13
|
+
none: "xr-none";
|
|
14
|
+
}>;
|
|
15
|
+
//# sourceMappingURL=XR_INPUT_DEVICE_IDS.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"XR_INPUT_DEVICE_IDS.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/device/XR_INPUT_DEVICE_IDS.js"],"names":[],"mappings":"AAaA;;;GAGG;AACH,+CAHW,MAAM,GAAC,OAAO,GAAC,MAAM,GACnB,MAAM,CAMlB;AAlBD;;;GAGG;AACH;;;;GAIG"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { assert } from "../../../../../core/assert.js";
|
|
2
|
+
import { XRHandedness } from "../../../devices/xr/XRHandedness.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Stable IDs used in serialized input maps.
|
|
6
|
+
* @readonly
|
|
7
|
+
*/
|
|
8
|
+
export const XR_INPUT_DEVICE_IDS = Object.freeze({
|
|
9
|
+
left: 'xr-left',
|
|
10
|
+
right: 'xr-right',
|
|
11
|
+
none: 'xr-none'
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @param {'left'|'right'|'none'} handedness
|
|
16
|
+
* @returns {string}
|
|
17
|
+
*/
|
|
18
|
+
export function xr_input_device_id(handedness) {
|
|
19
|
+
assert.enum(handedness, XRHandedness, 'handedness');
|
|
20
|
+
|
|
21
|
+
return XR_INPUT_DEVICE_IDS[handedness];
|
|
22
|
+
}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {import('./InputTriggerType.js').InputTriggerType} InputTriggerType
|
|
3
|
+
* @typedef {import('../InputSourceTable.js').InputSourceTable} InputSourceTable
|
|
4
|
+
* @typedef {import('../InputSource.js').InputSource} InputSource
|
|
5
|
+
* @typedef {import('../../../../../core/binary/BitSet.js').BitSet} BitSet
|
|
6
|
+
*/
|
|
1
7
|
/**
|
|
2
8
|
* A predicate over the set of currently held switches, plus - for the two stateful kinds - its own state.
|
|
3
9
|
*
|
|
@@ -26,7 +32,7 @@ export class InputTrigger {
|
|
|
26
32
|
/**
|
|
27
33
|
* @returns {InputTriggerType}
|
|
28
34
|
*/
|
|
29
|
-
get type():
|
|
35
|
+
get type(): number;
|
|
30
36
|
/**
|
|
31
37
|
* Number of switches that must be held simultaneously for this to be true. Used for specificity ordering,
|
|
32
38
|
* where a wider chord beats a narrower one so Ctrl+Z wins over a bare Z.
|
|
@@ -106,4 +112,8 @@ export class InputTrigger {
|
|
|
106
112
|
*/
|
|
107
113
|
hash(): number;
|
|
108
114
|
}
|
|
115
|
+
export type InputTriggerType = import('./InputTriggerType.js').InputTriggerType;
|
|
116
|
+
export type InputSourceTable = import('../InputSourceTable.js').InputSourceTable;
|
|
117
|
+
export type InputSource = import('../InputSource.js').InputSource;
|
|
118
|
+
export type BitSet = import('../../../../../core/binary/BitSet.js').BitSet;
|
|
109
119
|
//# sourceMappingURL=InputTrigger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputTrigger.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/trigger/InputTrigger.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH;IAEI;;;;OAIG;IACH,WAFU,OAAO,CAEC;IAElB;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"InputTrigger.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/trigger/InputTrigger.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH;IAEI;;;;OAIG;IACH,WAFU,OAAO,CAEC;IAElB;;OAEG;IACH,mBAEC;IAED;;;;OAIG;IACH,oBAEC;IAED;;;;OAIG;IACH,wBAEC;IAED;;;;OAIG;IACH,wBAEC;IAED;;;;;OAKG;IACH,eAFW,gBAAgB,QAI1B;IAED;;;;OAIG;IACH,uBAFW,WAAW,EAAE,QAIvB;IAED;;;;;OAKG;IACH,wBAFW,YAAY,EAAE,QAIxB;IAED;;;;;;;OAOG;IACH,eAJW,MAAM,QACN,MAAM,aACN,MAAM,QAIhB;IAED;;;;;;;;;;OAUG;IACH,YAHW,MAAM,QACN,MAAM,QAIhB;IAED;;;OAGG;IACH,WAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;OAGG;IACH,SAFa,YAAY,CAIxB;IAED;;;OAGG;IACH,cAHW,YAAY,GACV,OAAO,CAInB;IAED;;OAEG;IACH,QAFa,MAAM,CAIlB;CACJ;+BAzJY,OAAO,uBAAuB,EAAE,gBAAgB;+BAChD,OAAO,wBAAwB,EAAE,gBAAgB;0BACjD,OAAO,mBAAmB,EAAE,WAAW;qBACvC,OAAO,sCAAsC,EAAE,MAAM"}
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {import('./InputTriggerType.js').InputTriggerType} InputTriggerType
|
|
3
|
+
* @typedef {import('../InputSourceTable.js').InputSourceTable} InputSourceTable
|
|
4
|
+
* @typedef {import('../InputSource.js').InputSource} InputSource
|
|
5
|
+
* @typedef {import('../../../../../core/binary/BitSet.js').BitSet} BitSet
|
|
6
|
+
*/
|
|
7
|
+
|
|
1
8
|
/**
|
|
2
9
|
* A predicate over the set of currently held switches, plus - for the two stateful kinds - its own state.
|
|
3
10
|
*
|
|
@@ -21,9 +21,23 @@ export class InputTriggerChord extends InputTrigger {
|
|
|
21
21
|
*/
|
|
22
22
|
children: InputTrigger[];
|
|
23
23
|
/**
|
|
24
|
-
* @
|
|
24
|
+
* @param {InputSourceTable} table
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
resolve(table: InputSourceTable): void;
|
|
27
|
+
/**
|
|
28
|
+
* @param {InputSource[]} result
|
|
29
|
+
*/
|
|
30
|
+
collectSources(result: InputSource[]): void;
|
|
31
|
+
/**
|
|
32
|
+
* @param {BitSet} held
|
|
33
|
+
* @param {number} time
|
|
34
|
+
*/
|
|
35
|
+
reset(held: BitSet, time: number): void;
|
|
36
|
+
/**
|
|
37
|
+
* @param {BitSet} held
|
|
38
|
+
* @returns {boolean}
|
|
39
|
+
*/
|
|
40
|
+
test(held: BitSet): boolean;
|
|
27
41
|
/**
|
|
28
42
|
* @returns {InputTriggerChord}
|
|
29
43
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputTriggerChord.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/trigger/InputTriggerChord.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;GAWG;AACH;IA+BI;;;OAGG;IACH,yBAHc,YAAY,KACb,iBAAiB,CAU7B;IAzCD;;OAEG;IACH,UAFU,YAAY,EAAE,CAEV;
|
|
1
|
+
{"version":3,"file":"InputTriggerChord.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/trigger/InputTriggerChord.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;GAWG;AACH;IA+BI;;;OAGG;IACH,yBAHc,YAAY,KACb,iBAAiB,CAU7B;IAzCD;;OAEG;IACH,UAFU,YAAY,EAAE,CAEV;IAwCd;;OAEG;IACH,uCAMC;IAED;;OAEG;IACH,uBAFW,aAAa,QAQvB;IAaD;;;OAGG;IACH,0BAFW,MAAM,QAUhB;IAED;;;OAGG;IACH,oBAFa,OAAO,CAanB;IAED;;OAEG;IACH,SAFa,iBAAiB,CAI7B;CAyCJ;6BA3K4B,mBAAmB"}
|
|
@@ -33,9 +33,29 @@ export class InputTriggerHold extends InputTrigger {
|
|
|
33
33
|
*/
|
|
34
34
|
duration: number;
|
|
35
35
|
/**
|
|
36
|
-
* @
|
|
36
|
+
* @param {InputSourceTable} table
|
|
37
37
|
*/
|
|
38
|
-
|
|
38
|
+
resolve(table: InputSourceTable): void;
|
|
39
|
+
/**
|
|
40
|
+
* @param {InputSource[]} result
|
|
41
|
+
*/
|
|
42
|
+
collectSources(result: InputSource[]): void;
|
|
43
|
+
/**
|
|
44
|
+
* @param {BitSet} held
|
|
45
|
+
* @param {number} time
|
|
46
|
+
*/
|
|
47
|
+
reset(held: BitSet, time: number): void;
|
|
48
|
+
/**
|
|
49
|
+
* @param {BitSet} held
|
|
50
|
+
* @param {number} time
|
|
51
|
+
* @param {number} timeDelta
|
|
52
|
+
*/
|
|
53
|
+
evaluate(held: BitSet, time: number, timeDelta: number): void;
|
|
54
|
+
/**
|
|
55
|
+
* @param {BitSet} held
|
|
56
|
+
* @returns {boolean}
|
|
57
|
+
*/
|
|
58
|
+
test(held: BitSet): boolean;
|
|
39
59
|
/**
|
|
40
60
|
* @returns {InputTriggerHold}
|
|
41
61
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputTriggerHold.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/trigger/InputTriggerHold.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;GAiBG;AACH;IA8CI;;;;OAIG;IACH,mBAJW,YAAY,YACZ,MAAM,GACJ,gBAAgB,CAa5B;IA5DD;;OAEG;IACH,OAFU,YAAY,CAET;IAEb;;;OAGG;IACH,UAFU,MAAM,CAEH;
|
|
1
|
+
{"version":3,"file":"InputTriggerHold.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/trigger/InputTriggerHold.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;GAiBG;AACH;IA8CI;;;;OAIG;IACH,mBAJW,YAAY,YACZ,MAAM,GACJ,gBAAgB,CAa5B;IA5DD;;OAEG;IACH,OAFU,YAAY,CAET;IAEb;;;OAGG;IACH,UAFU,MAAM,CAEH;IAqDb;;OAEG;IACH,uCAEC;IAED;;OAEG;IACH,uBAFW,aAAa,QAIvB;IAYD;;;OAGG;IACH,0BAFW,MAAM,QAYhB;IAED;;;;OAIG;IACH,6BAHW,MAAM,aACN,MAAM,QAWhB;IAED;;;OAGG;IACH,oBAFa,OAAO,CAInB;IAED;;OAEG;IACH,SAFa,gBAAgB,CAI5B;;CAkBJ;6BA9K4B,mBAAmB"}
|
|
@@ -26,9 +26,23 @@ export class InputTriggerRelease extends InputTrigger {
|
|
|
26
26
|
*/
|
|
27
27
|
child: InputTrigger;
|
|
28
28
|
/**
|
|
29
|
-
* @
|
|
29
|
+
* @param {InputSourceTable} table
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
resolve(table: InputSourceTable): void;
|
|
32
|
+
/**
|
|
33
|
+
* @param {InputSource[]} result
|
|
34
|
+
*/
|
|
35
|
+
collectSources(result: InputSource[]): void;
|
|
36
|
+
/**
|
|
37
|
+
* @param {BitSet} held
|
|
38
|
+
* @param {number} time
|
|
39
|
+
*/
|
|
40
|
+
reset(held: BitSet, time: number): void;
|
|
41
|
+
/**
|
|
42
|
+
* @param {BitSet} held
|
|
43
|
+
* @returns {boolean}
|
|
44
|
+
*/
|
|
45
|
+
test(held: BitSet): boolean;
|
|
32
46
|
/**
|
|
33
47
|
* @returns {InputTriggerRelease}
|
|
34
48
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputTriggerRelease.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/trigger/InputTriggerRelease.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;GAgBG;AACH;IAsBI;;;OAGG;IACH,mBAHW,YAAY,GACV,mBAAmB,CAU/B;IAhCD;;OAEG;IACH,OAFU,YAAY,CAET;
|
|
1
|
+
{"version":3,"file":"InputTriggerRelease.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/trigger/InputTriggerRelease.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;GAgBG;AACH;IAsBI;;;OAGG;IACH,mBAHW,YAAY,GACV,mBAAmB,CAU/B;IAhCD;;OAEG;IACH,OAFU,YAAY,CAET;IA+Bb;;OAEG;IACH,uCAEC;IAED;;OAEG;IACH,uBAFW,aAAa,QAIvB;IASD;;;OAGG;IACH,0BAFW,MAAM,QAMhB;IAED;;;OAGG;IACH,oBAFa,OAAO,CAInB;IAED;;OAEG;IACH,SAFa,mBAAmB,CAI/B;CAiBJ;6BAtH4B,mBAAmB"}
|
|
@@ -51,15 +51,35 @@ export class InputTriggerSequence extends InputTrigger {
|
|
|
51
51
|
* @type {number}
|
|
52
52
|
*/
|
|
53
53
|
stepTimeout: number;
|
|
54
|
-
/**
|
|
55
|
-
* @returns {InputTriggerType}
|
|
56
|
-
*/
|
|
57
|
-
get type(): number;
|
|
58
54
|
/**
|
|
59
55
|
* @param {number} seconds
|
|
60
56
|
* @returns {InputTriggerSequence} this
|
|
61
57
|
*/
|
|
62
58
|
withStepTimeout(seconds: number): InputTriggerSequence;
|
|
59
|
+
/**
|
|
60
|
+
* @param {InputSourceTable} table
|
|
61
|
+
*/
|
|
62
|
+
resolve(table: InputSourceTable): void;
|
|
63
|
+
/**
|
|
64
|
+
* @param {InputSource[]} result
|
|
65
|
+
*/
|
|
66
|
+
collectSources(result: InputSource[]): void;
|
|
67
|
+
/**
|
|
68
|
+
* @param {BitSet} held
|
|
69
|
+
* @param {number} time
|
|
70
|
+
*/
|
|
71
|
+
reset(held: BitSet, time: number): void;
|
|
72
|
+
/**
|
|
73
|
+
* @param {BitSet} held
|
|
74
|
+
* @param {number} time
|
|
75
|
+
* @param {number} timeDelta
|
|
76
|
+
*/
|
|
77
|
+
evaluate(held: BitSet, time: number, timeDelta: number): void;
|
|
78
|
+
/**
|
|
79
|
+
* @param {BitSet} held
|
|
80
|
+
* @returns {boolean}
|
|
81
|
+
*/
|
|
82
|
+
test(held: BitSet): boolean;
|
|
63
83
|
/**
|
|
64
84
|
* @returns {InputTriggerSequence}
|
|
65
85
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputTriggerSequence.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/trigger/InputTriggerSequence.js"],"names":[],"mappings":"AAMA;;;;;;;;;GASG;AACH,kDAFU,MAAM,CAEqC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH;IAyEI;;;OAGG;IACH,sBAHc,YAAY,KACb,oBAAoB,CAUhC;IAnFD;;OAEG;IACH,OAFU,YAAY,EAAE,CAEb;IAEX;;;OAGG;IACH,aAFU,MAAM,CAEkC;
|
|
1
|
+
{"version":3,"file":"InputTriggerSequence.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/trigger/InputTriggerSequence.js"],"names":[],"mappings":"AAMA;;;;;;;;;GASG;AACH,kDAFU,MAAM,CAEqC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH;IAyEI;;;OAGG;IACH,sBAHc,YAAY,KACb,oBAAoB,CAUhC;IAnFD;;OAEG;IACH,OAFU,YAAY,EAAE,CAEb;IAEX;;;OAGG;IACH,aAFU,MAAM,CAEkC;IA4ElD;;;OAGG;IACH,yBAHW,MAAM,GACJ,oBAAoB,CAShC;IAED;;OAEG;IACH,uCAMC;IAED;;OAEG;IACH,uBAFW,aAAa,QAQvB;IAkCD;;;OAGG;IACH,0BAFW,MAAM,QAchB;IAED;;;;OAIG;IACH,6BAHW,MAAM,aACN,MAAM,QA8BhB;IAED;;;OAGG;IACH,oBAFa,OAAO,CAInB;IAED;;OAEG;IACH,SAFa,oBAAoB,CAQhC;;CA6CJ;6BAzT4B,mBAAmB"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {import('../InputSourceTable.js').InputSourceTable} InputSourceTable
|
|
3
|
+
* @typedef {import('../../../../../core/binary/BitSet.js').BitSet} BitSet
|
|
4
|
+
*/
|
|
1
5
|
/**
|
|
2
6
|
* True while one switch is held.
|
|
3
7
|
*
|
|
@@ -19,20 +23,14 @@ export class InputTriggerSwitch extends InputTrigger {
|
|
|
19
23
|
* @type {InputSource}
|
|
20
24
|
*/
|
|
21
25
|
source: InputSource;
|
|
22
|
-
/**
|
|
23
|
-
* @returns {InputTriggerType}
|
|
24
|
-
*/
|
|
25
|
-
get type(): number;
|
|
26
|
-
/**
|
|
27
|
-
* @param {InputSource[]} result
|
|
28
|
-
*/
|
|
29
|
-
collectSources(result: InputSource[]): void;
|
|
30
26
|
/**
|
|
31
27
|
* @returns {InputTriggerSwitch}
|
|
32
28
|
*/
|
|
33
29
|
clone(): InputTriggerSwitch;
|
|
34
30
|
#private;
|
|
35
31
|
}
|
|
32
|
+
export type InputSourceTable = import('../InputSourceTable.js').InputSourceTable;
|
|
33
|
+
export type BitSet = import('../../../../../core/binary/BitSet.js').BitSet;
|
|
36
34
|
import { InputTrigger } from "./InputTrigger.js";
|
|
37
35
|
import { InputSource } from "../InputSource.js";
|
|
38
36
|
//# sourceMappingURL=InputTriggerSwitch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputTriggerSwitch.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/trigger/InputTriggerSwitch.js"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AACH;IAwBI;;;OAGG;IACH,0BAHW,WAAW,GACT,kBAAkB,CAU9B;IAlCD;;OAEG;IACH,QAFU,WAAW,CAEM;
|
|
1
|
+
{"version":3,"file":"InputTriggerSwitch.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/trigger/InputTriggerSwitch.js"],"names":[],"mappings":"AAKA;;;GAGG;AAEH;;;;;;;;;;GAUG;AACH;IAwBI;;;OAGG;IACH,0BAHW,WAAW,GACT,kBAAkB,CAU9B;IAlCD;;OAEG;IACH,QAFU,WAAW,CAEM;IA6D3B;;OAEG;IACH,SAFa,kBAAkB,CAI9B;;CAiBJ;+BAvGY,OAAO,wBAAwB,EAAE,gBAAgB;qBACjD,OAAO,sCAAsC,EAAE,MAAM;6BALrC,mBAAmB;4BADpB,mBAAmB"}
|