@relu-interactives/spatial-ecs 0.3.14 → 0.3.15
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/dist/{chunk-XHMOFI3Q.js → chunk-GULLCPO6.js} +15 -10
- package/dist/chunk-GULLCPO6.js.map +1 -0
- package/dist/docs/guide/vr-and-hand-poses.md +11 -0
- package/dist/{index-CbrjAm_8.d.cts → index-BKGV3VvQ.d.cts} +8 -3
- package/dist/{index-CvIXdHzx.d.ts → index-Bi7L3QHF.d.ts} +8 -3
- package/dist/index.cjs +13 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/systems/index.cjs +13 -8
- package/dist/systems/index.cjs.map +1 -1
- package/dist/systems/index.d.cts +1 -1
- package/dist/systems/index.d.ts +1 -1
- package/dist/systems/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-XHMOFI3Q.js.map +0 -1
|
@@ -7205,17 +7205,22 @@ var _XRInteractionSystem = class _XRInteractionSystem {
|
|
|
7205
7205
|
return this.grabs.size > 0;
|
|
7206
7206
|
}
|
|
7207
7207
|
/**
|
|
7208
|
-
* Whether this
|
|
7208
|
+
* Whether this input's primary action is committed to interaction.
|
|
7209
7209
|
*
|
|
7210
|
-
* True while the
|
|
7210
|
+
* True while the source holds something, and also while it merely HOVERS a
|
|
7211
7211
|
* grabbable — because the pinch that is about to grab must not be read as a
|
|
7212
7212
|
* teleport by the locomotion system. Without the hover half, the first pinch
|
|
7213
7213
|
* of a grab teleports the player, and so does the pinch that takes an object
|
|
7214
7214
|
* from the other hand.
|
|
7215
|
+
*
|
|
7216
|
+
* Keyed on the INPUT SOURCE rather than handedness. Vision Pro reports
|
|
7217
|
+
* `handedness: "none"` for every gaze-pinch (it is hard-coded in WebKit), so a
|
|
7218
|
+
* handedness-keyed check silently never matched there and each pinch both
|
|
7219
|
+
* grabbed and teleported.
|
|
7215
7220
|
*/
|
|
7216
|
-
|
|
7217
|
-
if (this.
|
|
7218
|
-
const hover = this.
|
|
7221
|
+
isSourceBusy(world, input) {
|
|
7222
|
+
if (this.grabs.has(input)) return true;
|
|
7223
|
+
const hover = this.hovers.get(input);
|
|
7219
7224
|
if (!hover) return false;
|
|
7220
7225
|
const interactable = world.getComponent(
|
|
7221
7226
|
hover.entityId,
|
|
@@ -7309,7 +7314,7 @@ var _TeleportAimGate = class _TeleportAimGate {
|
|
|
7309
7314
|
if (aiming) this.aiming.add(source);
|
|
7310
7315
|
if (!releasing) return false;
|
|
7311
7316
|
this.aiming.delete(source);
|
|
7312
|
-
return hadAim;
|
|
7317
|
+
return hadAim || aiming;
|
|
7313
7318
|
}
|
|
7314
7319
|
/** True if this source currently has an aim engaged. */
|
|
7315
7320
|
isAiming(source) {
|
|
@@ -7483,7 +7488,7 @@ var _XRLocomotionSystem = class _XRLocomotionSystem {
|
|
|
7483
7488
|
const targets = this.collectTeleportTargets(world);
|
|
7484
7489
|
for (const input of inputs) {
|
|
7485
7490
|
const source = input;
|
|
7486
|
-
if (
|
|
7491
|
+
if (this.interactionSystem?.isSourceBusy(world, input)) {
|
|
7487
7492
|
if (this.teleportAim.cancel(source)) {
|
|
7488
7493
|
this.aimCurve = [];
|
|
7489
7494
|
this.landingPoint = null;
|
|
@@ -7492,7 +7497,7 @@ var _XRLocomotionSystem = class _XRLocomotionSystem {
|
|
|
7492
7497
|
continue;
|
|
7493
7498
|
}
|
|
7494
7499
|
const stick = this.readStickAim(input, source);
|
|
7495
|
-
const aiming = input.select || stick.aiming;
|
|
7500
|
+
const aiming = input.select || input.selectStart || stick.aiming;
|
|
7496
7501
|
const releasing = input.selectEnd || stick.released;
|
|
7497
7502
|
const commit = this.teleportAim.update(source, aiming, releasing);
|
|
7498
7503
|
if (!aiming && !commit) continue;
|
|
@@ -8861,5 +8866,5 @@ __name(_XRHoverVisualSystem, "XRHoverVisualSystem");
|
|
|
8861
8866
|
var XRHoverVisualSystem = _XRHoverVisualSystem;
|
|
8862
8867
|
|
|
8863
8868
|
export { ADDED_NODE_MARKER_COMPONENT, ARC_GRAVITY, ARC_MAX_TIME, ARC_SPEED, ARC_STEPS, AnimationSystem, AudioSystem, Behaviour, CURLED_COS, CameraSyncSystem, DEFAULT_ENTER_CONFIDENCE, DEFAULT_EXIT_CONFIDENCE, DEFAULT_LOST_GRACE_SECONDS, DEFAULT_MIN_HOLD_SECONDS, EnvironmentSyncSystem, FALLBACK_HAND_SCALE, HYDRATABLE_ENTITY_KINDS, HandPoseTracker, InputSystem, InstancedMeshSystem, KeyboardKeys, LightSyncSystem, MATCH_FALLOFF, MAX_PLAUSIBLE_SPEED, MAX_SAMPLE_AGE_SECONDS, MaterialSyncSystem, MeshGeometrySystem, NODE_KEY_SEPARATOR, NO_XR_CAPABILITIES, OVERRIDE_DIFF_EXCLUDED_COMPONENTS, OVERRIDE_ROOT_EXCLUDED_COMPONENTS, ObjectVisibilitySystem, PINCH_FINGERS, PREFAB_FILE_VERSION, PREFAB_FILE_VERSION_NESTED, PhysicsSyncSystem, PostprocessingSyncSystem, RenderSystem, SCRIPT_OBJECT_ROOT_FLAG, STRAIGHT_COS, ScriptBehaviourSystem, ScriptObject, ScriptObjectSystem, TeleportAimGate, ThrowVelocityTracker, TransformSyncSystem, VELOCITY_SAMPLES, VRTeleportAreaSystem, VideoSystem, XRControllerVisualSystem, XRHandPoseSystem, XRHoverVisualSystem, XRInputSystem, XRInteractionSystem, XRLocomotionSystem, XRSessionSystem, XRTeleportVisualSystem, XR_FINGERS, XR_HOVER_SHELL_FLAG, angularVelocityFrom, applyHandMaterial, arcGroundCrossing, buildComponentValueMaps, buildNodeKeyMapsFromSnapshot, buildNodeMapsFromSnapshot, canonicalizeComponentValue, clearPrefabCache, collectDiffPaths, collectEntitySubtree, collectSnapshotSubtreeIds, computeFingerCurl, computeHandShape, computeInstanceOverrides, computePalmPose, computePalmWidth, computePinch, computeSpread, createHandMaterial, decanonicalizeComponentValue, despawnPrefab, encodeOverride, estimateHandScale, findSnapshotRootEntityIds, findTopLevelNestedRegions, groupOverridePaths, hydrateWorldFromSnapshot, hydrateWorldFromSnapshotDetailed, indexSnapshotByEntity, instantiateSubtree, loadPrefab, matchHandPose, mergeComponentValue, parseOverride, parsePrefabAsset, prefabFileVersionFor, readXrCapabilities, restoreComponentState, restorePostCreateComponents, sampleTeleportArc, setPrefabAssetUrlResolver, spawnPrefab };
|
|
8864
|
-
//# sourceMappingURL=chunk-
|
|
8865
|
-
//# sourceMappingURL=chunk-
|
|
8869
|
+
//# sourceMappingURL=chunk-GULLCPO6.js.map
|
|
8870
|
+
//# sourceMappingURL=chunk-GULLCPO6.js.map
|