@relu-interactives/spatial-ecs 0.3.12 → 0.3.14

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 (45) hide show
  1. package/dist/{System-31wk-A0g.d.cts → System-BhnLw0fZ.d.cts} +7 -0
  2. package/dist/{System-31wk-A0g.d.ts → System-BhnLw0fZ.d.ts} +7 -0
  3. package/dist/{XRHandPose-DawOR0uR.d.cts → XRHandPose-LR4EhboN.d.cts} +25 -9
  4. package/dist/{XRHandPose-DhAd9Qi6.d.ts → XRHandPose-SZ7ou63b.d.ts} +25 -9
  5. package/dist/{chunk-OMDYLFTN.js → chunk-3LDQ4GVZ.js} +5 -5
  6. package/dist/chunk-3LDQ4GVZ.js.map +1 -0
  7. package/dist/{chunk-7ZIN6TGT.js → chunk-PNQ7HDQC.js} +3 -3
  8. package/dist/{chunk-7ZIN6TGT.js.map → chunk-PNQ7HDQC.js.map} +1 -1
  9. package/dist/{chunk-ID7U4FER.js → chunk-UHJ4MDIM.js} +7 -4
  10. package/dist/chunk-UHJ4MDIM.js.map +1 -0
  11. package/dist/{chunk-LCJ6IH2O.js → chunk-XHMOFI3Q.js} +104 -16
  12. package/dist/chunk-XHMOFI3Q.js.map +1 -0
  13. package/dist/components/index.cjs +3 -3
  14. package/dist/components/index.cjs.map +1 -1
  15. package/dist/components/index.d.cts +3 -3
  16. package/dist/components/index.d.ts +3 -3
  17. package/dist/components/index.js +1 -1
  18. package/dist/docs/guide/vr-and-hand-poses.md +5 -3
  19. package/dist/factories/index.cjs +6 -3
  20. package/dist/factories/index.cjs.map +1 -1
  21. package/dist/factories/index.d.cts +2 -2
  22. package/dist/factories/index.d.ts +2 -2
  23. package/dist/factories/index.js +3 -3
  24. package/dist/{index-Xm3im4Pt.d.cts → index-BL5EWkwY.d.cts} +2 -2
  25. package/dist/{index-B49322Q3.d.ts → index-ByiUoIoh.d.ts} +2 -2
  26. package/dist/{index-DJ9bn9SF.d.cts → index-CbrjAm_8.d.cts} +23 -1
  27. package/dist/{index-M0I5B3JA.d.ts → index-CvIXdHzx.d.ts} +23 -1
  28. package/dist/index.cjs +106 -14
  29. package/dist/index.cjs.map +1 -1
  30. package/dist/index.d.cts +45 -8
  31. package/dist/index.d.ts +45 -8
  32. package/dist/index.js +8 -8
  33. package/dist/systems/index.cjs +102 -14
  34. package/dist/systems/index.cjs.map +1 -1
  35. package/dist/systems/index.d.cts +2 -2
  36. package/dist/systems/index.d.ts +2 -2
  37. package/dist/systems/index.js +3 -3
  38. package/dist/types.d.cts +1 -1
  39. package/dist/types.d.ts +1 -1
  40. package/dist/worldSnapshotUtils.d.cts +1 -1
  41. package/dist/worldSnapshotUtils.d.ts +1 -1
  42. package/package.json +1 -1
  43. package/dist/chunk-ID7U4FER.js.map +0 -1
  44. package/dist/chunk-LCJ6IH2O.js.map +0 -1
  45. package/dist/chunk-OMDYLFTN.js.map +0 -1
@@ -1,5 +1,5 @@
1
- import { A as AnimationComponent, b as AudioComponent, c as CameraComponentOptions, C as CameraComponent, T as RigidbodyState, g as ColliderState, P as PhysicsComponent, o as EntityType, I as ImageComponent, q as ImageTargetAnchor, p as ImageTarget, L as LightComponent, M as MaterialComponent, B as MeshComponent, F as MeshGeometryComponent, J as ModelComponent, N as Name, O as Object3DRef, W as ScriptEntry, V as ScriptComponent, Y as ScriptObjectComponentInput, X as ScriptObjectComponent, _ as Selectable, $ as SelectionTransformState, a0 as SpriteComponent, w as InstancedMeshKind, G as MeshGeometryParameters, v as InstancedMeshComponent, t as InstanceSlotComponent, a6 as VideoComponent, af as XRRigComponent, a4 as VRTeleportAreaComponent, a8 as XRHandPoseComponent, aa as XRInteractableComponent, ac as XRInteractorComponent, ae as XRInteractorSideComponent } from '../XRHandPose-DawOR0uR.cjs';
2
- import { l as World, g as EnvironmentState, E as Environment, P as ParentId, i as PostprocessingState, h as Postprocessing, T as TransformComponent, O as ObjectManagementSystem } from '../System-31wk-A0g.cjs';
1
+ import { A as AnimationComponent, b as AudioComponent, c as CameraComponentOptions, C as CameraComponent, T as RigidbodyState, g as ColliderState, P as PhysicsComponent, o as EntityType, I as ImageComponent, q as ImageTargetAnchor, p as ImageTarget, L as LightComponent, M as MaterialComponent, B as MeshComponent, F as MeshGeometryComponent, J as ModelComponent, N as Name, O as Object3DRef, W as ScriptEntry, V as ScriptComponent, Y as ScriptObjectComponentInput, X as ScriptObjectComponent, _ as Selectable, $ as SelectionTransformState, a0 as SpriteComponent, w as InstancedMeshKind, G as MeshGeometryParameters, v as InstancedMeshComponent, t as InstanceSlotComponent, a6 as VideoComponent, af as XRRigComponent, a4 as VRTeleportAreaComponent, a8 as XRHandPoseComponent, aa as XRInteractableComponent, ac as XRInteractorComponent, ae as XRInteractorSideComponent } from '../XRHandPose-LR4EhboN.cjs';
2
+ import { l as World, g as EnvironmentState, E as Environment, P as ParentId, i as PostprocessingState, h as Postprocessing, T as TransformComponent, O as ObjectManagementSystem } from '../System-BhnLw0fZ.cjs';
3
3
  import * as THREE from 'three';
4
4
  import '@dimforge/rapier3d-compat';
5
5
  import '../handPose-dFxqbFFY.cjs';
@@ -1,5 +1,5 @@
1
- import { A as AnimationComponent, b as AudioComponent, c as CameraComponentOptions, C as CameraComponent, T as RigidbodyState, g as ColliderState, P as PhysicsComponent, o as EntityType, I as ImageComponent, q as ImageTargetAnchor, p as ImageTarget, L as LightComponent, M as MaterialComponent, B as MeshComponent, F as MeshGeometryComponent, J as ModelComponent, N as Name, O as Object3DRef, W as ScriptEntry, V as ScriptComponent, Y as ScriptObjectComponentInput, X as ScriptObjectComponent, _ as Selectable, $ as SelectionTransformState, a0 as SpriteComponent, w as InstancedMeshKind, G as MeshGeometryParameters, v as InstancedMeshComponent, t as InstanceSlotComponent, a6 as VideoComponent, af as XRRigComponent, a4 as VRTeleportAreaComponent, a8 as XRHandPoseComponent, aa as XRInteractableComponent, ac as XRInteractorComponent, ae as XRInteractorSideComponent } from '../XRHandPose-DhAd9Qi6.js';
2
- import { l as World, g as EnvironmentState, E as Environment, P as ParentId, i as PostprocessingState, h as Postprocessing, T as TransformComponent, O as ObjectManagementSystem } from '../System-31wk-A0g.js';
1
+ import { A as AnimationComponent, b as AudioComponent, c as CameraComponentOptions, C as CameraComponent, T as RigidbodyState, g as ColliderState, P as PhysicsComponent, o as EntityType, I as ImageComponent, q as ImageTargetAnchor, p as ImageTarget, L as LightComponent, M as MaterialComponent, B as MeshComponent, F as MeshGeometryComponent, J as ModelComponent, N as Name, O as Object3DRef, W as ScriptEntry, V as ScriptComponent, Y as ScriptObjectComponentInput, X as ScriptObjectComponent, _ as Selectable, $ as SelectionTransformState, a0 as SpriteComponent, w as InstancedMeshKind, G as MeshGeometryParameters, v as InstancedMeshComponent, t as InstanceSlotComponent, a6 as VideoComponent, af as XRRigComponent, a4 as VRTeleportAreaComponent, a8 as XRHandPoseComponent, aa as XRInteractableComponent, ac as XRInteractorComponent, ae as XRInteractorSideComponent } from '../XRHandPose-SZ7ou63b.js';
2
+ import { l as World, g as EnvironmentState, E as Environment, P as ParentId, i as PostprocessingState, h as Postprocessing, T as TransformComponent, O as ObjectManagementSystem } from '../System-BhnLw0fZ.js';
3
3
  import * as THREE from 'three';
4
4
  import '@dimforge/rapier3d-compat';
5
5
  import '../handPose-dFxqbFFY.js';
@@ -1,6 +1,6 @@
1
- export { createAnimationComponent, createAudioComponent, createCameraComponent, createEntityTypeComponent, createEnvironmentComponent, createImageComponent, createImageTargetAnchorComponent, createImageTargetComponent, createInstanceSlotComponent, createInstancedMeshComponent, createLightComponent, createMaterialComponent, createMeshComponent, createMeshGeometryComponent, createModelComponent, createNameComponent, createObject3DRefComponent, createParentIdComponent, createPhysicsComponent, createPostprocessingComponent, createScriptComponent, createScriptObjectComponent, createSelectableComponent, createSelectionTransformStateComponent, createSpriteComponent, createTransformComponent, createVRTeleportAreaComponent, createVideoComponent, createXRHandPoseComponent, createXRInteractableComponent, createXRInteractorComponent, createXRInteractorSideComponent, createXRRigComponent, registerDefaultComponentFactories, registerDefaultFactories } from '../chunk-ID7U4FER.js';
2
- import '../chunk-7ZIN6TGT.js';
3
- import '../chunk-OMDYLFTN.js';
1
+ export { createAnimationComponent, createAudioComponent, createCameraComponent, createEntityTypeComponent, createEnvironmentComponent, createImageComponent, createImageTargetAnchorComponent, createImageTargetComponent, createInstanceSlotComponent, createInstancedMeshComponent, createLightComponent, createMaterialComponent, createMeshComponent, createMeshGeometryComponent, createModelComponent, createNameComponent, createObject3DRefComponent, createParentIdComponent, createPhysicsComponent, createPostprocessingComponent, createScriptComponent, createScriptObjectComponent, createSelectableComponent, createSelectionTransformStateComponent, createSpriteComponent, createTransformComponent, createVRTeleportAreaComponent, createVideoComponent, createXRHandPoseComponent, createXRInteractableComponent, createXRInteractorComponent, createXRInteractorSideComponent, createXRRigComponent, registerDefaultComponentFactories, registerDefaultFactories } from '../chunk-UHJ4MDIM.js';
2
+ import '../chunk-PNQ7HDQC.js';
3
+ import '../chunk-3LDQ4GVZ.js';
4
4
  import '../chunk-OY7ZODZP.js';
5
5
  //# sourceMappingURL=index.js.map
6
6
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
- import { A as AnimationComponent, a as AnimationComponentOptions, b as AudioComponent, C as CameraComponent, c as CameraComponentOptions, d as CameraProjection, e as CameraRuntimeType, f as ColliderShape, g as ColliderState, h as CubeMeshParameters, D as DEFAULT_COLLIDER_STATE, i as DEFAULT_INSTANCED_MESH_PARAMETERS, j as DEFAULT_INSTANCE_TRANSFORM, k as DEFAULT_MESH_GEOMETRY_PARAMETERS, l as DEFAULT_PHYSICS_STATE, m as DEFAULT_POSE_CURLS, n as DEFAULT_RIGIDBODY_STATE, E as EditableMeshObjectKind, o as EntityType, I as ImageComponent, p as ImageTarget, q as ImageTargetAnchor, r as ImageTargetAnchorOptions, s as ImageTargetReference, t as InstanceSlotComponent, u as InstanceTransform, v as InstancedMeshComponent, w as InstancedMeshKind, L as LightComponent, x as LightValueState, M as MaterialComponent, y as MaterialTypeValue, z as MaterialValueState, B as MeshComponent, F as MeshGeometryComponent, G as MeshGeometryParameters, H as MeshGeometryParametersByKind, J as ModelComponent, N as Name, O as Object3DRef, P as PhysicsComponent, K as PhysicsState, Q as PlaneMeshParameters, R as RadiusHeightMeshParameters, S as RadiusMeshParameters, T as RigidbodyState, U as RigidbodyType, V as ScriptComponent, W as ScriptEntry, X as ScriptObjectComponent, Y as ScriptObjectComponentInput, Z as ScriptObjectRuntimeState, _ as Selectable, $ as SelectionTransformState, a0 as SpriteComponent, a1 as TextureFilteringValue, a2 as TransformModeValue, a3 as TransformSpaceValue, a4 as VRTeleportAreaComponent, a5 as VRTeleportAreaOptions, a6 as VideoComponent, a7 as VrTeleportShape, a8 as XRHandPoseComponent, a9 as XRHandPoseOptions, aa as XRInteractableComponent, ab as XRInteractableOptions, ac as XRInteractorComponent, ad as XRInteractorOptions, ae as XRInteractorSideComponent, af as XRRigComponent, ag as XRRigOptions, ah as XrAttachPoint, ai as XrDistanceGrabBehavior, aj as XrGrabGesture, ak as XrGrabHands, al as XrGrabReach, am as XrHandPoseEntry, an as XrHandPreset, ao as XrInteractorSide, ap as XrInteractorType, aq as XrLocomotionMode, ar as XrTrackingOrigin, as as XrTwoHandRotation, at as createAttachPoint, au as createHandPoseEntry, av as defaultMaterialValue, aw as handPoseDefinitionFor, ax as normalizePhysicsState, ay as setPhysicsLiveRef } from './XRHandPose-DawOR0uR.cjs';
2
- import { C as Component, D as DEFAULT_ENVIRONMENT_STATE, a as DEFAULT_POSTPROCESSING_STATE, E as Environment, b as EnvironmentFogState, c as EnvironmentFogType, d as EnvironmentGradientEffect, e as EnvironmentSkyboxState, f as EnvironmentSkyboxType, g as EnvironmentState, P as ParentId, h as Postprocessing, i as PostprocessingState, T as TransformComponent, j as TransformData, V as Vec3 } from './System-31wk-A0g.cjs';
1
+ import { A as AnimationComponent, a as AnimationComponentOptions, b as AudioComponent, C as CameraComponent, c as CameraComponentOptions, d as CameraProjection, e as CameraRuntimeType, f as ColliderShape, g as ColliderState, h as CubeMeshParameters, D as DEFAULT_COLLIDER_STATE, i as DEFAULT_INSTANCED_MESH_PARAMETERS, j as DEFAULT_INSTANCE_TRANSFORM, k as DEFAULT_MESH_GEOMETRY_PARAMETERS, l as DEFAULT_PHYSICS_STATE, m as DEFAULT_POSE_CURLS, n as DEFAULT_RIGIDBODY_STATE, E as EditableMeshObjectKind, o as EntityType, I as ImageComponent, p as ImageTarget, q as ImageTargetAnchor, r as ImageTargetAnchorOptions, s as ImageTargetReference, t as InstanceSlotComponent, u as InstanceTransform, v as InstancedMeshComponent, w as InstancedMeshKind, L as LightComponent, x as LightValueState, M as MaterialComponent, y as MaterialTypeValue, z as MaterialValueState, B as MeshComponent, F as MeshGeometryComponent, G as MeshGeometryParameters, H as MeshGeometryParametersByKind, J as ModelComponent, N as Name, O as Object3DRef, P as PhysicsComponent, K as PhysicsState, Q as PlaneMeshParameters, R as RadiusHeightMeshParameters, S as RadiusMeshParameters, T as RigidbodyState, U as RigidbodyType, V as ScriptComponent, W as ScriptEntry, X as ScriptObjectComponent, Y as ScriptObjectComponentInput, Z as ScriptObjectRuntimeState, _ as Selectable, $ as SelectionTransformState, a0 as SpriteComponent, a1 as TextureFilteringValue, a2 as TransformModeValue, a3 as TransformSpaceValue, a4 as VRTeleportAreaComponent, a5 as VRTeleportAreaOptions, a6 as VideoComponent, a7 as VrTeleportShape, a8 as XRHandPoseComponent, a9 as XRHandPoseOptions, aa as XRInteractableComponent, ab as XRInteractableOptions, ac as XRInteractorComponent, ad as XRInteractorOptions, ae as XRInteractorSideComponent, af as XRRigComponent, ag as XRRigOptions, ah as XrAttachPoint, ai as XrDistanceGrabBehavior, aj as XrGrabGesture, ak as XrGrabHands, al as XrGrabReach, am as XrHandPoseEntry, an as XrHandPreset, ao as XrInteractorSide, ap as XrInteractorType, aq as XrLocomotionMode, ar as XrTrackingOrigin, as as XrTwoHandRotation, at as createAttachPoint, au as createHandPoseEntry, av as defaultMaterialValue, aw as handPoseDefinitionFor, ax as normalizePhysicsState, ay as setPhysicsLiveRef } from './XRHandPose-LR4EhboN.cjs';
2
+ import { C as Component, D as DEFAULT_ENVIRONMENT_STATE, a as DEFAULT_POSTPROCESSING_STATE, E as Environment, b as EnvironmentFogState, c as EnvironmentFogType, d as EnvironmentGradientEffect, e as EnvironmentSkyboxState, f as EnvironmentSkyboxType, g as EnvironmentState, P as ParentId, h as Postprocessing, i as PostprocessingState, T as TransformComponent, j as TransformData, V as Vec3 } from './System-BhnLw0fZ.cjs';
3
3
 
4
4
  /**
5
5
  * Marks the ROOT entity of a prefab instance and records its link to the
@@ -1,5 +1,5 @@
1
- import { A as AnimationComponent, a as AnimationComponentOptions, b as AudioComponent, C as CameraComponent, c as CameraComponentOptions, d as CameraProjection, e as CameraRuntimeType, f as ColliderShape, g as ColliderState, h as CubeMeshParameters, D as DEFAULT_COLLIDER_STATE, i as DEFAULT_INSTANCED_MESH_PARAMETERS, j as DEFAULT_INSTANCE_TRANSFORM, k as DEFAULT_MESH_GEOMETRY_PARAMETERS, l as DEFAULT_PHYSICS_STATE, m as DEFAULT_POSE_CURLS, n as DEFAULT_RIGIDBODY_STATE, E as EditableMeshObjectKind, o as EntityType, I as ImageComponent, p as ImageTarget, q as ImageTargetAnchor, r as ImageTargetAnchorOptions, s as ImageTargetReference, t as InstanceSlotComponent, u as InstanceTransform, v as InstancedMeshComponent, w as InstancedMeshKind, L as LightComponent, x as LightValueState, M as MaterialComponent, y as MaterialTypeValue, z as MaterialValueState, B as MeshComponent, F as MeshGeometryComponent, G as MeshGeometryParameters, H as MeshGeometryParametersByKind, J as ModelComponent, N as Name, O as Object3DRef, P as PhysicsComponent, K as PhysicsState, Q as PlaneMeshParameters, R as RadiusHeightMeshParameters, S as RadiusMeshParameters, T as RigidbodyState, U as RigidbodyType, V as ScriptComponent, W as ScriptEntry, X as ScriptObjectComponent, Y as ScriptObjectComponentInput, Z as ScriptObjectRuntimeState, _ as Selectable, $ as SelectionTransformState, a0 as SpriteComponent, a1 as TextureFilteringValue, a2 as TransformModeValue, a3 as TransformSpaceValue, a4 as VRTeleportAreaComponent, a5 as VRTeleportAreaOptions, a6 as VideoComponent, a7 as VrTeleportShape, a8 as XRHandPoseComponent, a9 as XRHandPoseOptions, aa as XRInteractableComponent, ab as XRInteractableOptions, ac as XRInteractorComponent, ad as XRInteractorOptions, ae as XRInteractorSideComponent, af as XRRigComponent, ag as XRRigOptions, ah as XrAttachPoint, ai as XrDistanceGrabBehavior, aj as XrGrabGesture, ak as XrGrabHands, al as XrGrabReach, am as XrHandPoseEntry, an as XrHandPreset, ao as XrInteractorSide, ap as XrInteractorType, aq as XrLocomotionMode, ar as XrTrackingOrigin, as as XrTwoHandRotation, at as createAttachPoint, au as createHandPoseEntry, av as defaultMaterialValue, aw as handPoseDefinitionFor, ax as normalizePhysicsState, ay as setPhysicsLiveRef } from './XRHandPose-DhAd9Qi6.js';
2
- import { C as Component, D as DEFAULT_ENVIRONMENT_STATE, a as DEFAULT_POSTPROCESSING_STATE, E as Environment, b as EnvironmentFogState, c as EnvironmentFogType, d as EnvironmentGradientEffect, e as EnvironmentSkyboxState, f as EnvironmentSkyboxType, g as EnvironmentState, P as ParentId, h as Postprocessing, i as PostprocessingState, T as TransformComponent, j as TransformData, V as Vec3 } from './System-31wk-A0g.js';
1
+ import { A as AnimationComponent, a as AnimationComponentOptions, b as AudioComponent, C as CameraComponent, c as CameraComponentOptions, d as CameraProjection, e as CameraRuntimeType, f as ColliderShape, g as ColliderState, h as CubeMeshParameters, D as DEFAULT_COLLIDER_STATE, i as DEFAULT_INSTANCED_MESH_PARAMETERS, j as DEFAULT_INSTANCE_TRANSFORM, k as DEFAULT_MESH_GEOMETRY_PARAMETERS, l as DEFAULT_PHYSICS_STATE, m as DEFAULT_POSE_CURLS, n as DEFAULT_RIGIDBODY_STATE, E as EditableMeshObjectKind, o as EntityType, I as ImageComponent, p as ImageTarget, q as ImageTargetAnchor, r as ImageTargetAnchorOptions, s as ImageTargetReference, t as InstanceSlotComponent, u as InstanceTransform, v as InstancedMeshComponent, w as InstancedMeshKind, L as LightComponent, x as LightValueState, M as MaterialComponent, y as MaterialTypeValue, z as MaterialValueState, B as MeshComponent, F as MeshGeometryComponent, G as MeshGeometryParameters, H as MeshGeometryParametersByKind, J as ModelComponent, N as Name, O as Object3DRef, P as PhysicsComponent, K as PhysicsState, Q as PlaneMeshParameters, R as RadiusHeightMeshParameters, S as RadiusMeshParameters, T as RigidbodyState, U as RigidbodyType, V as ScriptComponent, W as ScriptEntry, X as ScriptObjectComponent, Y as ScriptObjectComponentInput, Z as ScriptObjectRuntimeState, _ as Selectable, $ as SelectionTransformState, a0 as SpriteComponent, a1 as TextureFilteringValue, a2 as TransformModeValue, a3 as TransformSpaceValue, a4 as VRTeleportAreaComponent, a5 as VRTeleportAreaOptions, a6 as VideoComponent, a7 as VrTeleportShape, a8 as XRHandPoseComponent, a9 as XRHandPoseOptions, aa as XRInteractableComponent, ab as XRInteractableOptions, ac as XRInteractorComponent, ad as XRInteractorOptions, ae as XRInteractorSideComponent, af as XRRigComponent, ag as XRRigOptions, ah as XrAttachPoint, ai as XrDistanceGrabBehavior, aj as XrGrabGesture, ak as XrGrabHands, al as XrGrabReach, am as XrHandPoseEntry, an as XrHandPreset, ao as XrInteractorSide, ap as XrInteractorType, aq as XrLocomotionMode, ar as XrTrackingOrigin, as as XrTwoHandRotation, at as createAttachPoint, au as createHandPoseEntry, av as defaultMaterialValue, aw as handPoseDefinitionFor, ax as normalizePhysicsState, ay as setPhysicsLiveRef } from './XRHandPose-SZ7ou63b.js';
2
+ import { C as Component, D as DEFAULT_ENVIRONMENT_STATE, a as DEFAULT_POSTPROCESSING_STATE, E as Environment, b as EnvironmentFogState, c as EnvironmentFogType, d as EnvironmentGradientEffect, e as EnvironmentSkyboxState, f as EnvironmentSkyboxType, g as EnvironmentState, P as ParentId, h as Postprocessing, i as PostprocessingState, T as TransformComponent, j as TransformData, V as Vec3 } from './System-BhnLw0fZ.js';
3
3
 
4
4
  /**
5
5
  * Marks the ROOT entity of a prefab instance and records its link to the
@@ -1,4 +1,4 @@
1
- import { k as EcsSystem, l as World } from './System-31wk-A0g.cjs';
1
+ import { k as EcsSystem, l as World } from './System-BhnLw0fZ.cjs';
2
2
  import * as THREE from 'three';
3
3
  import { k as XrHandJoints, q as XrHandShape } from './handPose-dFxqbFFY.cjs';
4
4
 
@@ -500,6 +500,16 @@ declare class XRInteractionSystem implements EcsSystem {
500
500
  getHeldEntityIds(): Set<number>;
501
501
  /** True when any source is holding something. */
502
502
  isGrabbing(): boolean;
503
+ /**
504
+ * Whether this hand's primary action is committed to interaction.
505
+ *
506
+ * True while the hand holds something, and also while it merely HOVERS a
507
+ * grabbable — because the pinch that is about to grab must not be read as a
508
+ * teleport by the locomotion system. Without the hover half, the first pinch
509
+ * of a grab teleports the player, and so does the pinch that takes an object
510
+ * from the other hand.
511
+ */
512
+ isHandBusy(world: World, handedness: XrInputState["handedness"]): boolean;
503
513
  /** True when THIS hand is holding something. */
504
514
  isGrabbingWith(handedness: XrInputState["handedness"]): boolean;
505
515
  /**
@@ -535,8 +545,20 @@ declare class XRLocomotionSystem implements EcsSystem {
535
545
  private aimValid;
536
546
  /** Sources currently aiming via thumbstick (hysteresis, so it doesn't chatter). */
537
547
  private readonly stickAiming;
548
+ /** Gates teleport commits on a prior aim. See {@link TeleportAimGate}. */
549
+ private readonly teleportAim;
538
550
  /** True once we've tried to self-heal camera parenting for this session. */
539
551
  private parentingChecked;
552
+ /**
553
+ * Optional; when wired, hands busy grabbing are excluded from teleport.
554
+ *
555
+ * On hand tracking the SAME pinch drives both grabbing and teleport aiming,
556
+ * so without this a user who picks something up is teleported at the same
557
+ * moment.
558
+ */
559
+ private interactionSystem;
560
+ /** Wire the interaction system so grabs suppress teleport on that hand. */
561
+ setInteractionSystem(interactionSystem: XRInteractionSystem | null): void;
540
562
  constructor(inputSystem: XRInputSystem);
541
563
  update(world: World, deltaTime: number): void;
542
564
  /**
@@ -1,4 +1,4 @@
1
- import { k as EcsSystem, l as World } from './System-31wk-A0g.js';
1
+ import { k as EcsSystem, l as World } from './System-BhnLw0fZ.js';
2
2
  import * as THREE from 'three';
3
3
  import { k as XrHandJoints, q as XrHandShape } from './handPose-dFxqbFFY.js';
4
4
 
@@ -500,6 +500,16 @@ declare class XRInteractionSystem implements EcsSystem {
500
500
  getHeldEntityIds(): Set<number>;
501
501
  /** True when any source is holding something. */
502
502
  isGrabbing(): boolean;
503
+ /**
504
+ * Whether this hand's primary action is committed to interaction.
505
+ *
506
+ * True while the hand holds something, and also while it merely HOVERS a
507
+ * grabbable — because the pinch that is about to grab must not be read as a
508
+ * teleport by the locomotion system. Without the hover half, the first pinch
509
+ * of a grab teleports the player, and so does the pinch that takes an object
510
+ * from the other hand.
511
+ */
512
+ isHandBusy(world: World, handedness: XrInputState["handedness"]): boolean;
503
513
  /** True when THIS hand is holding something. */
504
514
  isGrabbingWith(handedness: XrInputState["handedness"]): boolean;
505
515
  /**
@@ -535,8 +545,20 @@ declare class XRLocomotionSystem implements EcsSystem {
535
545
  private aimValid;
536
546
  /** Sources currently aiming via thumbstick (hysteresis, so it doesn't chatter). */
537
547
  private readonly stickAiming;
548
+ /** Gates teleport commits on a prior aim. See {@link TeleportAimGate}. */
549
+ private readonly teleportAim;
538
550
  /** True once we've tried to self-heal camera parenting for this session. */
539
551
  private parentingChecked;
552
+ /**
553
+ * Optional; when wired, hands busy grabbing are excluded from teleport.
554
+ *
555
+ * On hand tracking the SAME pinch drives both grabbing and teleport aiming,
556
+ * so without this a user who picks something up is teleported at the same
557
+ * moment.
558
+ */
559
+ private interactionSystem;
560
+ /** Wire the interaction system so grabs suppress teleport on that hand. */
561
+ setInteractionSystem(interactionSystem: XRInteractionSystem | null): void;
540
562
  constructor(inputSystem: XRInputSystem);
541
563
  update(world: World, deltaTime: number): void;
542
564
  /**
package/dist/index.cjs CHANGED
@@ -2852,8 +2852,8 @@ var _XRInteractableComponent = class _XRInteractableComponent extends Component
2852
2852
  this.attachPoints = (options?.attachPoints ?? []).map(
2853
2853
  (point) => createAttachPoint(point)
2854
2854
  );
2855
- this.throwOnRelease = options?.throwOnRelease ?? true;
2856
- this.throwStrength = options?.throwStrength ?? 1;
2855
+ this.applyVelocityOnRelease = options?.applyVelocityOnRelease ?? true;
2856
+ this.velocityScale = options?.velocityScale ?? 1;
2857
2857
  this.hoverBehavior = options?.hoverBehavior ?? "color";
2858
2858
  this.hoverColor = options?.hoverColor ?? "#4da3ff";
2859
2859
  this.hoverScale = options?.hoverScale ?? 1.06;
@@ -2890,7 +2890,7 @@ var _XRInteractorComponent = class _XRInteractorComponent extends Component {
2890
2890
  this.handColor = options?.handColor ?? "#e8b48a";
2891
2891
  this.handOpacity = options?.handOpacity ?? 1;
2892
2892
  this.handEmissiveIntensity = options?.handEmissiveIntensity ?? 0;
2893
- this.showRay = options?.showRay ?? true;
2893
+ this.rayVisibility = options?.rayVisibility ?? "interacting";
2894
2894
  this.rayColor = options?.rayColor ?? "#4da3ff";
2895
2895
  this.rayThickness = options?.rayThickness ?? 6e-3;
2896
2896
  }
@@ -4229,6 +4229,9 @@ function createXRInteractor({
4229
4229
  });
4230
4230
  world.addComponent(entityId, new XRInteractorComponent(options));
4231
4231
  scene.add(root);
4232
+ if (payload.skipDefaultChildren) {
4233
+ return entityId;
4234
+ }
4232
4235
  for (const side of ["left", "right"]) {
4233
4236
  const slot = new THREE51__namespace.Group();
4234
4237
  const label = side === "left" ? "Left Interactor" : "Right Interactor";
@@ -4905,11 +4908,15 @@ function restorePostCreateComponents(world, objectManagementSystem, targetEntity
4905
4908
  )
4906
4909
  );
4907
4910
  }
4908
- if (typeof sourceInteractable.throwOnRelease === "boolean") {
4909
- interactable.throwOnRelease = sourceInteractable.throwOnRelease;
4911
+ if (typeof sourceInteractable.applyVelocityOnRelease === "boolean") {
4912
+ interactable.applyVelocityOnRelease = sourceInteractable.applyVelocityOnRelease;
4913
+ } else if (typeof sourceInteractable.throwOnRelease === "boolean") {
4914
+ interactable.applyVelocityOnRelease = sourceInteractable.throwOnRelease;
4910
4915
  }
4911
- if (typeof sourceInteractable.throwStrength === "number") {
4912
- interactable.throwStrength = sourceInteractable.throwStrength;
4916
+ if (typeof sourceInteractable.velocityScale === "number") {
4917
+ interactable.velocityScale = sourceInteractable.velocityScale;
4918
+ } else if (typeof sourceInteractable.throwStrength === "number") {
4919
+ interactable.velocityScale = sourceInteractable.throwStrength;
4913
4920
  }
4914
4921
  const grabPos = asRecord3(sourceInteractable.grabOffsetPosition);
4915
4922
  if (grabPos) {
@@ -4985,8 +4992,10 @@ function restorePostCreateComponents(world, objectManagementSystem, targetEntity
4985
4992
  if (typeof sourceInteractor.handEmissiveIntensity === "number") {
4986
4993
  interactor.handEmissiveIntensity = sourceInteractor.handEmissiveIntensity;
4987
4994
  }
4988
- if (typeof sourceInteractor.showRay === "boolean") {
4989
- interactor.showRay = sourceInteractor.showRay;
4995
+ if (typeof sourceInteractor.rayVisibility === "string") {
4996
+ interactor.rayVisibility = sourceInteractor.rayVisibility;
4997
+ } else if (typeof sourceInteractor.showRay === "boolean") {
4998
+ interactor.rayVisibility = sourceInteractor.showRay ? "interacting" : "never";
4990
4999
  }
4991
5000
  if (typeof sourceInteractor.rayColor === "string") {
4992
5001
  interactor.rayColor = sourceInteractor.rayColor;
@@ -5793,6 +5802,7 @@ function hydrateWorldFromSnapshotDetailed(snapshot, world, objectManagementSyste
5793
5802
  isDefault: true
5794
5803
  };
5795
5804
  }
5805
+ payload.skipDefaultChildren = true;
5796
5806
  const createdEntityId = objectManagementSystem.createNow(kind, world, payload);
5797
5807
  idMap.set(sourceEntityId, createdEntityId);
5798
5808
  }
@@ -11635,8 +11645,8 @@ var _XRInteractionSystem = class _XRInteractionSystem {
11635
11645
  if (held.restoreBodyType !== null && physics) {
11636
11646
  physics.values.rigidbody.type = held.restoreBodyType;
11637
11647
  const dynamic = held.restoreBodyType === "dynamic";
11638
- if (dynamic && interactable?.throwOnRelease) {
11639
- const velocity = held.tracker.computeVelocity(this.elapsed).multiplyScalar(interactable.throwStrength);
11648
+ if (dynamic && interactable?.applyVelocityOnRelease) {
11649
+ const velocity = held.tracker.computeVelocity(this.elapsed).multiplyScalar(interactable.velocityScale);
11640
11650
  const spin = held.angularVelocity;
11641
11651
  setPhysicsLiveRef(physics, "pendingVelocity", {
11642
11652
  linear: { x: velocity.x, y: velocity.y, z: velocity.z },
@@ -11717,6 +11727,25 @@ var _XRInteractionSystem = class _XRInteractionSystem {
11717
11727
  isGrabbing() {
11718
11728
  return this.grabs.size > 0;
11719
11729
  }
11730
+ /**
11731
+ * Whether this hand's primary action is committed to interaction.
11732
+ *
11733
+ * True while the hand holds something, and also while it merely HOVERS a
11734
+ * grabbable — because the pinch that is about to grab must not be read as a
11735
+ * teleport by the locomotion system. Without the hover half, the first pinch
11736
+ * of a grab teleports the player, and so does the pinch that takes an object
11737
+ * from the other hand.
11738
+ */
11739
+ isHandBusy(world, handedness) {
11740
+ if (this.isGrabbingWith(handedness)) return true;
11741
+ const hover = this.getHoverFor(handedness);
11742
+ if (!hover) return false;
11743
+ const interactable = world.getComponent(
11744
+ hover.entityId,
11745
+ XRInteractableComponent
11746
+ );
11747
+ return Boolean(interactable?.enabled && interactable.grabbable);
11748
+ }
11720
11749
  /** True when THIS hand is holding something. */
11721
11750
  isGrabbingWith(handedness) {
11722
11751
  for (const input of this.grabs.keys()) {
@@ -11788,6 +11817,42 @@ function arcGroundCrossing(points, groundY) {
11788
11817
  }
11789
11818
  __name(arcGroundCrossing, "arcGroundCrossing");
11790
11819
 
11820
+ // core/xr/teleportAimGate.ts
11821
+ var _TeleportAimGate = class _TeleportAimGate {
11822
+ constructor() {
11823
+ this.aiming = /* @__PURE__ */ new WeakSet();
11824
+ }
11825
+ /**
11826
+ * Feed one frame for one source.
11827
+ *
11828
+ * @returns whether the teleport should commit this frame.
11829
+ */
11830
+ update(source, aiming, releasing) {
11831
+ const hadAim = this.aiming.has(source);
11832
+ if (aiming) this.aiming.add(source);
11833
+ if (!releasing) return false;
11834
+ this.aiming.delete(source);
11835
+ return hadAim;
11836
+ }
11837
+ /** True if this source currently has an aim engaged. */
11838
+ isAiming(source) {
11839
+ return this.aiming.has(source);
11840
+ }
11841
+ /**
11842
+ * Drop a source's aim without committing.
11843
+ *
11844
+ * Called when a hand starts interacting, so the release that ends the grab
11845
+ * cannot cash in an aim engaged before it.
11846
+ *
11847
+ * @returns whether an aim was actually discarded.
11848
+ */
11849
+ cancel(source) {
11850
+ return this.aiming.delete(source);
11851
+ }
11852
+ };
11853
+ __name(_TeleportAimGate, "TeleportAimGate");
11854
+ var TeleportAimGate = _TeleportAimGate;
11855
+
11791
11856
  // core/systems/XRLocomotionSystem.ts
11792
11857
  var UP = new THREE51__namespace.Vector3(0, 1, 0);
11793
11858
  var AXIS_DEADZONE = 0.5;
@@ -11805,10 +11870,24 @@ var _XRLocomotionSystem = class _XRLocomotionSystem {
11805
11870
  this.aimValid = false;
11806
11871
  /** Sources currently aiming via thumbstick (hysteresis, so it doesn't chatter). */
11807
11872
  this.stickAiming = /* @__PURE__ */ new WeakSet();
11873
+ /** Gates teleport commits on a prior aim. See {@link TeleportAimGate}. */
11874
+ this.teleportAim = new TeleportAimGate();
11808
11875
  /** True once we've tried to self-heal camera parenting for this session. */
11809
11876
  this.parentingChecked = false;
11877
+ /**
11878
+ * Optional; when wired, hands busy grabbing are excluded from teleport.
11879
+ *
11880
+ * On hand tracking the SAME pinch drives both grabbing and teleport aiming,
11881
+ * so without this a user who picks something up is teleported at the same
11882
+ * moment.
11883
+ */
11884
+ this.interactionSystem = null;
11810
11885
  this.inputSystem = inputSystem;
11811
11886
  }
11887
+ /** Wire the interaction system so grabs suppress teleport on that hand. */
11888
+ setInteractionSystem(interactionSystem) {
11889
+ this.interactionSystem = interactionSystem;
11890
+ }
11812
11891
  update(world, deltaTime) {
11813
11892
  this.aimCurve = [];
11814
11893
  this.landingPoint = null;
@@ -11927,9 +12006,18 @@ var _XRLocomotionSystem = class _XRLocomotionSystem {
11927
12006
  const targets = this.collectTeleportTargets(world);
11928
12007
  for (const input of inputs) {
11929
12008
  const source = input;
12009
+ if (input.handedness !== "none" && this.interactionSystem?.isHandBusy(world, input.handedness)) {
12010
+ if (this.teleportAim.cancel(source)) {
12011
+ this.aimCurve = [];
12012
+ this.landingPoint = null;
12013
+ this.aimValid = false;
12014
+ }
12015
+ continue;
12016
+ }
11930
12017
  const stick = this.readStickAim(input, source);
11931
12018
  const aiming = input.select || stick.aiming;
11932
- const commit = input.selectEnd || stick.released;
12019
+ const releasing = input.selectEnd || stick.released;
12020
+ const commit = this.teleportAim.update(source, aiming, releasing);
11933
12021
  if (!aiming && !commit) continue;
11934
12022
  const points = sampleTeleportArc(
11935
12023
  input.rayOrigin,
@@ -12402,9 +12490,12 @@ var _XRControllerVisualSystem = class _XRControllerVisualSystem {
12402
12490
  * clutter implying the whole scene is clickable.
12403
12491
  */
12404
12492
  shouldShowRay(interactor, side) {
12405
- if (interactor && !interactor.showRay) return false;
12493
+ const visibility = interactor?.rayVisibility ?? "interacting";
12494
+ if (visibility === "never") return false;
12495
+ if (visibility === "always") return true;
12406
12496
  if (!this.interactionSystem) return true;
12407
- return this.interactionSystem.getHoverFor(side) !== null || this.interactionSystem.isGrabbingWith(side);
12497
+ if (this.interactionSystem.isGrabbingWith(side)) return false;
12498
+ return this.interactionSystem.getHoverFor(side) !== null;
12408
12499
  }
12409
12500
  /** Push the author's ray colour and thickness onto the mesh. */
12410
12501
  applyRayStyle(ray, interactor) {
@@ -14715,6 +14806,7 @@ exports.STRAIGHT_COS = STRAIGHT_COS;
14715
14806
  exports.ScriptBehaviourSystem = ScriptBehaviourSystem;
14716
14807
  exports.ScriptObject = ScriptObject;
14717
14808
  exports.ScriptObjectSystem = ScriptObjectSystem;
14809
+ exports.TeleportAimGate = TeleportAimGate;
14718
14810
  exports.ThrowVelocityTracker = ThrowVelocityTracker;
14719
14811
  exports.TransformSyncSystem = TransformSyncSystem;
14720
14812
  exports.VELOCITY_SAMPLES = VELOCITY_SAMPLES;