@relu-interactives/spatial-ecs 0.3.15 → 0.3.17

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.
@@ -7352,6 +7352,8 @@ var _XRLocomotionSystem = class _XRLocomotionSystem {
7352
7352
  this.aimValid = false;
7353
7353
  /** Sources currently aiming via thumbstick (hysteresis, so it doesn't chatter). */
7354
7354
  this.stickAiming = /* @__PURE__ */ new WeakSet();
7355
+ /** One-time warning when a committed teleport found nowhere to land. */
7356
+ this.warnedNoLanding = false;
7355
7357
  /** Gates teleport commits on a prior aim. See {@link TeleportAimGate}. */
7356
7358
  this.teleportAim = new TeleportAimGate();
7357
7359
  /** True once we've tried to self-heal camera parenting for this session. */
@@ -7498,7 +7500,8 @@ var _XRLocomotionSystem = class _XRLocomotionSystem {
7498
7500
  }
7499
7501
  const stick = this.readStickAim(input, source);
7500
7502
  const aiming = input.select || input.selectStart || stick.aiming;
7501
- const releasing = input.selectEnd || stick.released;
7503
+ const vanished = !input.connected && this.teleportAim.isAiming(source);
7504
+ const releasing = input.selectEnd || stick.released || vanished;
7502
7505
  const commit = this.teleportAim.update(source, aiming, releasing);
7503
7506
  if (!aiming && !commit) continue;
7504
7507
  const points = sampleTeleportArc(
@@ -7518,6 +7521,12 @@ var _XRLocomotionSystem = class _XRLocomotionSystem {
7518
7521
  this.landingPoint = null;
7519
7522
  this.aimValid = false;
7520
7523
  } else if (commit) {
7524
+ if (!this.warnedNoLanding) {
7525
+ this.warnedNoLanding = true;
7526
+ console.warn(
7527
+ "[XRLocomotionSystem] Teleport released but the arc did not land on a Teleport Area. Add a teleportArea entity where the player should be able to go."
7528
+ );
7529
+ }
7521
7530
  this.aimCurve = [];
7522
7531
  this.aimValid = false;
7523
7532
  }
@@ -8866,5 +8875,5 @@ __name(_XRHoverVisualSystem, "XRHoverVisualSystem");
8866
8875
  var XRHoverVisualSystem = _XRHoverVisualSystem;
8867
8876
 
8868
8877
  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 };
8869
- //# sourceMappingURL=chunk-GULLCPO6.js.map
8870
- //# sourceMappingURL=chunk-GULLCPO6.js.map
8878
+ //# sourceMappingURL=chunk-CE2CPZSP.js.map
8879
+ //# sourceMappingURL=chunk-CE2CPZSP.js.map