@woosh/meep-engine 3.35.0 → 3.36.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 +63 -0
- package/src/engine/input/devices/XRInputDevice.d.ts.map +1 -0
- package/src/engine/input/devices/XRInputDevice.js +386 -0
- package/src/engine/input/devices/xr/XRInputAction.d.ts +37 -0
- package/src/engine/input/devices/xr/XRInputAction.d.ts.map +1 -0
- package/src/engine/input/devices/xr/XRInputAction.js +85 -0
- package/src/engine/input/devices/xr/XRInputButton.d.ts +28 -0
- package/src/engine/input/devices/xr/XRInputButton.d.ts.map +1 -0
- package/src/engine/input/devices/xr/XRInputButton.js +43 -0
- package/src/engine/input/devices/xr/XRInputCoordinates.d.ts +15 -0
- package/src/engine/input/devices/xr/XRInputCoordinates.d.ts.map +1 -0
- package/src/engine/input/devices/xr/XRInputCoordinates.js +21 -0
- package/src/engine/input/devices/xr/XRInputHandle.d.ts +63 -0
- package/src/engine/input/devices/xr/XRInputHandle.d.ts.map +1 -0
- package/src/engine/input/devices/xr/XRInputHandle.js +171 -0
- package/src/engine/input/devices/xr/XRInputPose.d.ts +23 -0
- package/src/engine/input/devices/xr/XRInputPose.d.ts.map +1 -0
- package/src/engine/input/devices/xr/XRInputPose.js +36 -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/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 +15 -4
- package/src/engine/input/ecs/ism/coordinate/InputCoordinateDevice.d.ts.map +1 -1
- package/src/engine/input/ecs/ism/coordinate/InputCoordinateDevice.js +22 -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 +16 -0
- package/src/engine/input/ecs/ism/device/XRInputDeviceAdapter.d.ts.map +1 -0
- package/src/engine/input/ecs/ism/device/XRInputDeviceAdapter.js +54 -0
- package/src/engine/input/ecs/ism/device/XR_INPUT_DEVICE_IDS.d.ts +9 -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 +12 -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 +7 -0
- package/src/engine/input/ecs/ism/trigger/InputTriggerXRButton.d.ts.map +1 -0
- package/src/engine/input/ecs/ism/trigger/InputTriggerXRButton.js +15 -0
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
|
@@ -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,20 @@ 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
|
+
* @param {'left'|'right'|'none'} handedness
|
|
90
|
+
* @param {number} code XRInputCoordinates or xr_input_button_coordinate/xr_input_axis_coordinate.
|
|
91
|
+
* @returns {InputCoordinateDevice}
|
|
92
|
+
*/
|
|
93
|
+
static fromXR(handedness, code) {
|
|
94
|
+
assert.isNonNegativeInteger(code, 'code');
|
|
95
|
+
const dimensions = code === XRInputCoordinates.thumbstick || code === XRInputCoordinates.touchpad ? 2 : 1;
|
|
96
|
+
return InputCoordinateDevice.fromSource(InputCoordinateSource.from(
|
|
97
|
+
xr_input_device_id(handedness), code, dimensions, InputCoordinateKind.Normalized
|
|
98
|
+
));
|
|
99
|
+
}
|
|
100
|
+
|
|
79
101
|
/**
|
|
80
102
|
* A pointer channel. `position` is 2-D absolute; `move` is 2-D and `wheel` is 3-D, both relative and
|
|
81
103
|
* 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,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A persistent XR handedness slot, usable before hardware exists and across source swaps.
|
|
3
|
+
* Native pressed/touched switches are independent of semantic select/squeeze completion. Subscribe to
|
|
4
|
+
* those outcomes directly through their Signals (or InputController paths such as xr/right/select/completed).
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* new InputMapSystem([new XRInputDeviceAdapter(engine.devices.xr, 'right')]);
|
|
8
|
+
* map.bindCoordinate('pressure', InputCoordinateDevice.fromXR('right', XRInputCoordinates.select));
|
|
9
|
+
*/
|
|
10
|
+
export class XRInputDeviceAdapter extends InputDeviceAdapter {
|
|
11
|
+
/** @param {import('../../../devices/XRInputDevice.js').XRInputDevice} device @param {'left'|'right'|'none'} handedness */
|
|
12
|
+
constructor(device: import('../../../devices/XRInputDevice.js').XRInputDevice, handedness: 'left' | 'right' | 'none');
|
|
13
|
+
#private;
|
|
14
|
+
}
|
|
15
|
+
import { InputDeviceAdapter } from "./InputDeviceAdapter.js";
|
|
16
|
+
//# 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;;;;;;;;GAQG;AACH;IAII,0HAA0H;IAC1H,oBADY,OAAO,mCAAmC,EAAE,aAAa,cAAiB,MAAM,GAAC,OAAO,GAAC,MAAM,EAK1G;;CA8BJ;mCAnDkC,yBAAyB"}
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
* A persistent XR handedness slot, usable before hardware exists and across source swaps.
|
|
8
|
+
* Native pressed/touched switches are independent of semantic select/squeeze completion. Subscribe to
|
|
9
|
+
* those outcomes directly through their Signals (or InputController paths such as xr/right/select/completed).
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* new InputMapSystem([new XRInputDeviceAdapter(engine.devices.xr, 'right')]);
|
|
13
|
+
* map.bindCoordinate('pressure', InputCoordinateDevice.fromXR('right', XRInputCoordinates.select));
|
|
14
|
+
*/
|
|
15
|
+
export class XRInputDeviceAdapter extends InputDeviceAdapter {
|
|
16
|
+
/** @type {import('../../../devices/xr/XRInputHandle.js').XRInputHandle} */
|
|
17
|
+
#handle;
|
|
18
|
+
|
|
19
|
+
/** @param {import('../../../devices/XRInputDevice.js').XRInputDevice} device @param {'left'|'right'|'none'} handedness */
|
|
20
|
+
constructor(device, handedness) {
|
|
21
|
+
super();
|
|
22
|
+
this.id = xr_input_device_id(handedness);
|
|
23
|
+
this.#handle = device[handedness];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** @param {number} code Even codes are pressed, odd codes touched; button index is floor(code/2). */
|
|
27
|
+
getSwitch(code) {
|
|
28
|
+
assert.isNonNegativeInteger(code, 'code');
|
|
29
|
+
const button = this.#handle.getButton(Math.floor(code / 2));
|
|
30
|
+
return code % 2 === 0 ? button.pressed : button.touched;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** @param {number[]|Float64Array} result @param {number} offset @param {number} code */
|
|
34
|
+
readCoordinate(result, offset, code) {
|
|
35
|
+
assert.isNonNegativeInteger(code, 'code');
|
|
36
|
+
const handle = this.#handle;
|
|
37
|
+
switch (code) {
|
|
38
|
+
case XRInputCoordinates.select: result[offset] = handle.select.x; return;
|
|
39
|
+
case XRInputCoordinates.squeeze: result[offset] = handle.squeeze.x; return;
|
|
40
|
+
case XRInputCoordinates.thumbstick:
|
|
41
|
+
result[offset] = handle.thumbstick.value.x;
|
|
42
|
+
result[offset + 1] = handle.thumbstick.value.y;
|
|
43
|
+
return;
|
|
44
|
+
case XRInputCoordinates.touchpad:
|
|
45
|
+
result[offset] = handle.touchpad.x;
|
|
46
|
+
result[offset + 1] = handle.touchpad.y;
|
|
47
|
+
return;
|
|
48
|
+
default: {
|
|
49
|
+
const index = Math.floor((code - 4) / 2);
|
|
50
|
+
result[offset] = code % 2 === 0 ? handle.getButton(index).x : handle.getAxis(index).x;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** @param {'left'|'right'|'none'} handedness @returns {string} */
|
|
2
|
+
export function xr_input_device_id(handedness: 'left' | 'right' | 'none'): string;
|
|
3
|
+
/** @readonly Stable IDs used in serialized input maps. */
|
|
4
|
+
export const XR_INPUT_DEVICE_IDS: Readonly<{
|
|
5
|
+
left: "xr-left";
|
|
6
|
+
right: "xr-right";
|
|
7
|
+
none: "xr-none";
|
|
8
|
+
}>;
|
|
9
|
+
//# 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":"AAGA,kEAAkE;AAClE,+CADY,MAAM,GAAC,OAAO,GAAC,MAAM,GAAuB,MAAM,CAQ7D;AAXD,0DAA0D;AAC1D;;;;GAA0G"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** @readonly Stable IDs used in serialized input maps. */
|
|
2
|
+
export const XR_INPUT_DEVICE_IDS = Object.freeze({ left: 'xr-left', right: 'xr-right', none: 'xr-none' });
|
|
3
|
+
|
|
4
|
+
/** @param {'left'|'right'|'none'} handedness @returns {string} */
|
|
5
|
+
export function xr_input_device_id(handedness) {
|
|
6
|
+
switch (handedness) {
|
|
7
|
+
case 'left': return XR_INPUT_DEVICE_IDS.left;
|
|
8
|
+
case 'right': return XR_INPUT_DEVICE_IDS.right;
|
|
9
|
+
case 'none': return XR_INPUT_DEVICE_IDS.none;
|
|
10
|
+
default: throw new Error(`Invalid XR handedness: ${handedness}`);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -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"}
|
|
@@ -3,6 +3,11 @@ import { InputSource } from "../InputSource.js";
|
|
|
3
3
|
import { InputTrigger } from "./InputTrigger.js";
|
|
4
4
|
import { InputTriggerType } from "./InputTriggerType.js";
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* @typedef {import('../InputSourceTable.js').InputSourceTable} InputSourceTable
|
|
8
|
+
* @typedef {import('../../../../../core/binary/BitSet.js').BitSet} BitSet
|
|
9
|
+
*/
|
|
10
|
+
|
|
6
11
|
/**
|
|
7
12
|
* True while one switch is held.
|
|
8
13
|
*
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Native button facts only. No pressure threshold or semantic action lifecycle is inferred. */
|
|
2
|
+
export class InputTriggerXRButton extends InputTriggerSwitch {
|
|
3
|
+
/** @param {'left'|'right'|'none'} handedness @param {number} index @param {boolean} [touched=false] */
|
|
4
|
+
static from(handedness: 'left' | 'right' | 'none', index: number, touched?: boolean): InputTriggerXRButton;
|
|
5
|
+
}
|
|
6
|
+
import { InputTriggerSwitch } from "./InputTriggerSwitch.js";
|
|
7
|
+
//# sourceMappingURL=InputTriggerXRButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputTriggerXRButton.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/input/ecs/ism/trigger/InputTriggerXRButton.js"],"names":[],"mappings":"AAKA,gGAAgG;AAChG;IACI,uGAAuG;IACvG,wBADY,MAAM,GAAC,OAAO,GAAC,MAAM,SAAqB,MAAM,YAAgB,OAAO,wBAMlF;CACJ;mCAXkC,yBAAyB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { assert } from "../../../../../core/assert.js";
|
|
2
|
+
import { xr_input_device_id } from "../device/XR_INPUT_DEVICE_IDS.js";
|
|
3
|
+
import { InputSource } from "../InputSource.js";
|
|
4
|
+
import { InputTriggerSwitch } from "./InputTriggerSwitch.js";
|
|
5
|
+
|
|
6
|
+
/** Native button facts only. No pressure threshold or semantic action lifecycle is inferred. */
|
|
7
|
+
export class InputTriggerXRButton extends InputTriggerSwitch {
|
|
8
|
+
/** @param {'left'|'right'|'none'} handedness @param {number} index @param {boolean} [touched=false] */
|
|
9
|
+
static from(handedness, index, touched = false) {
|
|
10
|
+
assert.isNonNegativeInteger(index, 'index');
|
|
11
|
+
const result = new InputTriggerXRButton();
|
|
12
|
+
result.source = InputSource.from(xr_input_device_id(handedness), index * 2 + (touched ? 1 : 0));
|
|
13
|
+
return result;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -64,11 +64,11 @@ export class FluidObstacleSystem extends System<any> {
|
|
|
64
64
|
/**
|
|
65
65
|
* @param {FluidComponent} fluid
|
|
66
66
|
*/
|
|
67
|
-
static "__#
|
|
67
|
+
static "__#418@#refresh_masks"(fluid: FluidComponent): void;
|
|
68
68
|
/**
|
|
69
69
|
* @param {FluidComponent} fluid
|
|
70
70
|
*/
|
|
71
|
-
static "__#
|
|
71
|
+
static "__#418@#clear_field"(fluid: FluidComponent): void;
|
|
72
72
|
/**
|
|
73
73
|
* Mark every cell of `fluid` whose centre lies within `inflation` of the
|
|
74
74
|
* posed shape as solid. Iteration is clipped to the shape's world AABB
|
|
@@ -80,7 +80,7 @@ export class FluidObstacleSystem extends System<any> {
|
|
|
80
80
|
* @param {number} inflation world-units SDF threshold
|
|
81
81
|
* @param {Float64Array} point length-3 scratch
|
|
82
82
|
*/
|
|
83
|
-
static "__#
|
|
83
|
+
static "__#418@#voxelize"(fluid: FluidComponent, posed: PosedShape3D, aabb: Float64Array, inflation: number, point: Float64Array): void;
|
|
84
84
|
/**
|
|
85
85
|
* Write the obstacle's translation velocity onto every face of every cell
|
|
86
86
|
* it voxelized — the moving-wall boundary condition. Runs AFTER the mask
|
|
@@ -100,7 +100,7 @@ export class FluidObstacleSystem extends System<any> {
|
|
|
100
100
|
* @param {number} wvy
|
|
101
101
|
* @param {number} wvz
|
|
102
102
|
*/
|
|
103
|
-
static "__#
|
|
103
|
+
static "__#418@#stamp_wall_velocity"(fluid: FluidComponent, posed: PosedShape3D, aabb: Float64Array, inflation: number, point: Float64Array, wvx: number, wvy: number, wvz: number): void;
|
|
104
104
|
constructor();
|
|
105
105
|
dependencies: (typeof FluidObstacle)[];
|
|
106
106
|
components_used: (ResourceAccessSpecification<typeof Transform64> | ResourceAccessSpecification<typeof RigidBody> | ResourceAccessSpecification<typeof Collider> | ResourceAccessSpecification<typeof FluidComponent> | ResourceAccessSpecification<typeof FluidObstacle>)[];
|
|
@@ -13,7 +13,7 @@ export class TinyGltf {
|
|
|
13
13
|
* @readonly
|
|
14
14
|
* @type {TextureFormat}
|
|
15
15
|
*/
|
|
16
|
-
static readonly "__#
|
|
16
|
+
static readonly "__#254@#UNCOMPRESSED_TARGET": TextureFormat;
|
|
17
17
|
/**
|
|
18
18
|
* @param {AssetManager} assetManager
|
|
19
19
|
* @param {AssetRequestScope} [scope]
|