@relu-interactives/spatial-ecs 0.3.21 → 0.4.1

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 (46) hide show
  1. package/dist/{System-BhnLw0fZ.d.cts → System-ln4Q7Eot.d.cts} +15 -1
  2. package/dist/{System-BhnLw0fZ.d.ts → System-ln4Q7Eot.d.ts} +15 -1
  3. package/dist/{XRHandPose-CrzI57JA.d.ts → XRHandPose-BImIa4ZS.d.ts} +82 -2
  4. package/dist/{XRHandPose-CLl4MiHx.d.cts → XRHandPose-CxPv-LBo.d.cts} +82 -2
  5. package/dist/{chunk-H6DQ7JRE.js → chunk-4AK4I3QF.js} +33 -3
  6. package/dist/chunk-4AK4I3QF.js.map +1 -0
  7. package/dist/{chunk-D6KXWNYT.js → chunk-4DWZK4X4.js} +3 -3
  8. package/dist/{chunk-D6KXWNYT.js.map → chunk-4DWZK4X4.js.map} +1 -1
  9. package/dist/{chunk-CDSE7476.js → chunk-LAOFCFEI.js} +554 -5
  10. package/dist/chunk-LAOFCFEI.js.map +1 -0
  11. package/dist/{chunk-P42OE3RU.js → chunk-SGADE55G.js} +14 -5
  12. package/dist/chunk-SGADE55G.js.map +1 -0
  13. package/dist/components/index.cjs +30 -0
  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/mixed-reality.md +120 -0
  19. package/dist/factories/index.cjs +26 -0
  20. package/dist/factories/index.cjs.map +1 -1
  21. package/dist/factories/index.d.cts +5 -3
  22. package/dist/factories/index.d.ts +5 -3
  23. package/dist/factories/index.js +3 -3
  24. package/dist/{index-C2I5PxCI.d.cts → index-CBdnIyI8.d.cts} +94 -2
  25. package/dist/{index-g777AmFv.d.cts → index-CQsHUez3.d.cts} +42 -4
  26. package/dist/{index-JRcoel9F.d.ts → index-CuGqxuk-.d.ts} +42 -4
  27. package/dist/{index-6l4hn2Sh.d.ts → index-n7SeH119.d.ts} +94 -2
  28. package/dist/index.cjs +610 -0
  29. package/dist/index.cjs.map +1 -1
  30. package/dist/index.d.cts +9 -8
  31. package/dist/index.d.ts +9 -8
  32. package/dist/index.js +26 -8
  33. package/dist/index.js.map +1 -1
  34. package/dist/systems/index.cjs +580 -0
  35. package/dist/systems/index.cjs.map +1 -1
  36. package/dist/systems/index.d.cts +2 -2
  37. package/dist/systems/index.d.ts +2 -2
  38. package/dist/systems/index.js +3 -3
  39. package/dist/types.d.cts +1 -1
  40. package/dist/types.d.ts +1 -1
  41. package/dist/worldSnapshotUtils.d.cts +1 -1
  42. package/dist/worldSnapshotUtils.d.ts +1 -1
  43. package/package.json +1 -1
  44. package/dist/chunk-CDSE7476.js.map +0 -1
  45. package/dist/chunk-H6DQ7JRE.js.map +0 -1
  46. package/dist/chunk-P42OE3RU.js.map +0 -1
@@ -1,5 +1,5 @@
1
- import { A as AnimationComponent, b as AudioComponent, c as CameraComponentOptions, C as CameraComponent, U as RigidbodyState, g as ColliderState, P as PhysicsComponent, p as EntityType, I as ImageComponent, r as ImageTargetAnchor, q as ImageTarget, L as LightComponent, M as MaterialComponent, F as MeshComponent, G as MeshGeometryComponent, K as ModelComponent, N as Name, O as Object3DRef, X as ScriptEntry, W as ScriptComponent, Z as ScriptObjectComponentInput, Y as ScriptObjectComponent, $ as Selectable, a0 as SelectionTransformState, a1 as SpriteComponent, x as InstancedMeshKind, H as MeshGeometryParameters, w as InstancedMeshComponent, u as InstanceSlotComponent, a7 as VideoComponent, ag as XRRigComponent, a5 as VRTeleportAreaComponent, a9 as XRHandPoseComponent, ab as XRInteractableComponent, ad as XRInteractorComponent, af as XRInteractorSideComponent } from '../XRHandPose-CLl4MiHx.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';
1
+ import { A as AnimationComponent, b as AudioComponent, c as CameraComponentOptions, C as CameraComponent, U as RigidbodyState, g as ColliderState, P as PhysicsComponent, p as EntityType, I as ImageComponent, r as ImageTargetAnchor, q as ImageTarget, L as LightComponent, M as MaterialComponent, F as MeshComponent, G as MeshGeometryComponent, K as ModelComponent, N as Name, O as Object3DRef, X as ScriptEntry, W as ScriptComponent, Z as ScriptObjectComponentInput, Y as ScriptObjectComponent, $ as Selectable, a0 as SelectionTransformState, a1 as SpriteComponent, x as InstancedMeshKind, H as MeshGeometryParameters, w as InstancedMeshComponent, u as InstanceSlotComponent, a7 as VideoComponent, ai as XRRigComponent, a5 as VRTeleportAreaComponent, ab as XRHandPoseComponent, a9 as XRAnchorComponent, ad as XRInteractableComponent, af as XRInteractorComponent, ah as XRInteractorSideComponent } from '../XRHandPose-CxPv-LBo.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-ln4Q7Eot.cjs';
3
3
  import * as THREE from 'three';
4
4
  import '@dimforge/rapier3d-compat';
5
5
  import '../handPose-DlcTtqgx.cjs';
@@ -81,6 +81,8 @@ declare function createVRTeleportAreaComponent(world: World, entityId: number, .
81
81
 
82
82
  declare function createXRHandPoseComponent(world: World, entityId: number, ...args: ConstructorParameters<typeof XRHandPoseComponent>): XRHandPoseComponent;
83
83
 
84
+ declare function createXRAnchorComponent(world: World, entityId: number, ...args: ConstructorParameters<typeof XRAnchorComponent>): XRAnchorComponent;
85
+
84
86
  declare function createXRInteractableComponent(world: World, entityId: number, ...args: ConstructorParameters<typeof XRInteractableComponent>): XRInteractableComponent;
85
87
 
86
88
  declare function createXRInteractorComponent(world: World, entityId: number, ...args: ConstructorParameters<typeof XRInteractorComponent>): XRInteractorComponent;
@@ -91,4 +93,4 @@ declare function registerDefaultComponentFactories(objectManagementSystem: Objec
91
93
 
92
94
  declare function registerDefaultFactories(objectManagementSystem: ObjectManagementSystem): void;
93
95
 
94
- 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 };
96
+ 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, createXRAnchorComponent, createXRHandPoseComponent, createXRInteractableComponent, createXRInteractorComponent, createXRInteractorSideComponent, createXRRigComponent, registerDefaultComponentFactories, registerDefaultFactories };
@@ -1,5 +1,5 @@
1
- import { A as AnimationComponent, b as AudioComponent, c as CameraComponentOptions, C as CameraComponent, U as RigidbodyState, g as ColliderState, P as PhysicsComponent, p as EntityType, I as ImageComponent, r as ImageTargetAnchor, q as ImageTarget, L as LightComponent, M as MaterialComponent, F as MeshComponent, G as MeshGeometryComponent, K as ModelComponent, N as Name, O as Object3DRef, X as ScriptEntry, W as ScriptComponent, Z as ScriptObjectComponentInput, Y as ScriptObjectComponent, $ as Selectable, a0 as SelectionTransformState, a1 as SpriteComponent, x as InstancedMeshKind, H as MeshGeometryParameters, w as InstancedMeshComponent, u as InstanceSlotComponent, a7 as VideoComponent, ag as XRRigComponent, a5 as VRTeleportAreaComponent, a9 as XRHandPoseComponent, ab as XRInteractableComponent, ad as XRInteractorComponent, af as XRInteractorSideComponent } from '../XRHandPose-CrzI57JA.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';
1
+ import { A as AnimationComponent, b as AudioComponent, c as CameraComponentOptions, C as CameraComponent, U as RigidbodyState, g as ColliderState, P as PhysicsComponent, p as EntityType, I as ImageComponent, r as ImageTargetAnchor, q as ImageTarget, L as LightComponent, M as MaterialComponent, F as MeshComponent, G as MeshGeometryComponent, K as ModelComponent, N as Name, O as Object3DRef, X as ScriptEntry, W as ScriptComponent, Z as ScriptObjectComponentInput, Y as ScriptObjectComponent, $ as Selectable, a0 as SelectionTransformState, a1 as SpriteComponent, x as InstancedMeshKind, H as MeshGeometryParameters, w as InstancedMeshComponent, u as InstanceSlotComponent, a7 as VideoComponent, ai as XRRigComponent, a5 as VRTeleportAreaComponent, ab as XRHandPoseComponent, a9 as XRAnchorComponent, ad as XRInteractableComponent, af as XRInteractorComponent, ah as XRInteractorSideComponent } from '../XRHandPose-BImIa4ZS.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-ln4Q7Eot.js';
3
3
  import * as THREE from 'three';
4
4
  import '@dimforge/rapier3d-compat';
5
5
  import '../handPose-DlcTtqgx.js';
@@ -81,6 +81,8 @@ declare function createVRTeleportAreaComponent(world: World, entityId: number, .
81
81
 
82
82
  declare function createXRHandPoseComponent(world: World, entityId: number, ...args: ConstructorParameters<typeof XRHandPoseComponent>): XRHandPoseComponent;
83
83
 
84
+ declare function createXRAnchorComponent(world: World, entityId: number, ...args: ConstructorParameters<typeof XRAnchorComponent>): XRAnchorComponent;
85
+
84
86
  declare function createXRInteractableComponent(world: World, entityId: number, ...args: ConstructorParameters<typeof XRInteractableComponent>): XRInteractableComponent;
85
87
 
86
88
  declare function createXRInteractorComponent(world: World, entityId: number, ...args: ConstructorParameters<typeof XRInteractorComponent>): XRInteractorComponent;
@@ -91,4 +93,4 @@ declare function registerDefaultComponentFactories(objectManagementSystem: Objec
91
93
 
92
94
  declare function registerDefaultFactories(objectManagementSystem: ObjectManagementSystem): void;
93
95
 
94
- 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 };
96
+ 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, createXRAnchorComponent, createXRHandPoseComponent, createXRInteractableComponent, createXRInteractorComponent, createXRInteractorSideComponent, createXRRigComponent, registerDefaultComponentFactories, registerDefaultFactories };
@@ -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-P42OE3RU.js';
2
- import '../chunk-D6KXWNYT.js';
3
- import '../chunk-H6DQ7JRE.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, createXRAnchorComponent, createXRHandPoseComponent, createXRInteractableComponent, createXRInteractorComponent, createXRInteractorSideComponent, createXRRigComponent, registerDefaultComponentFactories, registerDefaultFactories } from '../chunk-SGADE55G.js';
2
+ import '../chunk-4DWZK4X4.js';
3
+ import '../chunk-4AK4I3QF.js';
4
4
  import '../chunk-OY7ZODZP.js';
5
5
  //# sourceMappingURL=index.js.map
6
6
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { k as EcsSystem, l as World } from './System-BhnLw0fZ.cjs';
1
+ import { k as EcsSystem, l as World, r as EntityId } from './System-ln4Q7Eot.cjs';
2
2
  import * as THREE from 'three';
3
3
  import { m as XrHandJoints, r as XrHandShape } from './handPose-DlcTtqgx.cjs';
4
4
 
@@ -28,6 +28,8 @@ declare class EnvironmentSyncSystem implements EcsSystem {
28
28
  private signature;
29
29
  private activeTexture;
30
30
  private pendingImageUrl;
31
+ /** Whether the skybox is currently withheld because passthrough is on. */
32
+ private passthroughSuppressed;
31
33
  constructor(scene: THREE.Scene);
32
34
  private disposeActiveTexture;
33
35
  private applySkybox;
@@ -682,6 +684,96 @@ declare class XRSessionSystem implements EcsSystem {
682
684
  getInputs(): XrInputState[];
683
685
  }
684
686
 
687
+ declare class XREnvironmentSystem implements EcsSystem {
688
+ /** Keyed by the XRPlane/XRMesh object itself — the runtime's own identity. */
689
+ private readonly planes;
690
+ private readonly meshes;
691
+ private presenting;
692
+ private debugVisible;
693
+ update(world: World): void;
694
+ /** How many pieces of real geometry are currently colliding. Script-facing. */
695
+ getDetectedCount(): {
696
+ planes: number;
697
+ meshes: number;
698
+ };
699
+ private findRig;
700
+ private syncPlanes;
701
+ private syncMeshes;
702
+ private createPlaneEntity;
703
+ private applyPlaneCollider;
704
+ private createMeshEntity;
705
+ /** A thin box so a detected plane can be SEEN, not just collided with. */
706
+ private attachPlaneDebug;
707
+ private applyPose;
708
+ private applyDebugVisibility;
709
+ private destroyEntry;
710
+ private clearMap;
711
+ private clearAll;
712
+ dispose(world: World): void;
713
+ }
714
+
715
+ /**
716
+ * Answers "where does this ray meet the real world?".
717
+ *
718
+ * Physics colliders (`XREnvironmentSystem`) tell you what the room IS; hit-test
719
+ * tells you where a specific ray lands on it, which is what placement needs —
720
+ * dropping a model onto a real table, or showing a reticle on the floor where
721
+ * content will spawn. It works even where plane and mesh detection are not
722
+ * granted, because the runtime answers from its own understanding of the scene
723
+ * rather than from geometry it has handed over.
724
+ *
725
+ * Two kinds of target are tracked:
726
+ *
727
+ * - `"viewer"` — straight ahead from the headset. The reticle case.
728
+ * - a handedness — along that controller's or hand's pointing ray.
729
+ *
730
+ * Sources are requested ASYNCHRONOUSLY, so a result is null for the first few
731
+ * frames after a session starts, and null again whenever the ray happens to
732
+ * point at nothing the runtime recognises. Callers must handle null every frame
733
+ * rather than caching the first hit.
734
+ */
735
+ /** Where a ray met the real world. */
736
+ type XrHitResult = {
737
+ position: THREE.Vector3;
738
+ quaternion: THREE.Quaternion;
739
+ };
740
+ type TargetKey = "viewer" | XrHandedness;
741
+ declare class XRHitTestSystem implements EcsSystem {
742
+ private readonly sources;
743
+ /** Targets whose async request is in flight, so it is not fired twice. */
744
+ private readonly pending;
745
+ private readonly results;
746
+ private presenting;
747
+ private enabled;
748
+ update(world: World): void;
749
+ /**
750
+ * Where the given ray meets the real world this frame, or null.
751
+ *
752
+ * Null is the normal case, not an error: the source may still be being
753
+ * requested, the ray may point at nothing recognised, or the runtime may not
754
+ * have granted `hit-test` at all.
755
+ */
756
+ getHitResult(target?: TargetKey): XrHitResult | null;
757
+ private rigWantsHitTest;
758
+ private ensureViewerSource;
759
+ private ensureInputSources;
760
+ private teardown;
761
+ dispose(): void;
762
+ }
763
+
764
+ declare class XRAnchorSystem implements EcsSystem {
765
+ private readonly anchors;
766
+ /** In-flight creations, so one entity is not anchored twice. */
767
+ private readonly pending;
768
+ private presenting;
769
+ update(world: World): void;
770
+ /** Whether this entity's pose is currently being driven by an anchor. */
771
+ isAnchored(entityId: EntityId): boolean;
772
+ private requestAnchor;
773
+ private releaseAll;
774
+ dispose(): void;
775
+ }
776
+
685
777
  declare class VRTeleportAreaSystem implements EcsSystem {
686
778
  private readonly signatures;
687
779
  update(world: World): void;
@@ -865,4 +957,4 @@ declare class XRHoverVisualSystem implements EcsSystem {
865
957
  dispose(): void;
866
958
  }
867
959
 
868
- export { AnimationSystem as A, CameraSyncSystem as C, EnvironmentSyncSystem as E, InstancedMeshSystem as I, LightSyncSystem as L, MaterialSyncSystem as M, NO_XR_CAPABILITIES as N, ObjectVisibilitySystem as O, PhysicsSyncSystem as P, SCRIPT_OBJECT_ROOT_FLAG as S, VRTeleportAreaSystem as V, type XrCapabilities as X, type XrInputState as a, type XrHandPoseEventDetail as b, AudioSystem as c, MeshGeometrySystem as d, type ModuleLoader as e, PostprocessingSyncSystem as f, ScriptBehaviourSystem as g, ScriptObjectSystem as h, type SelectionContext as i, VideoSystem as j, XRControllerVisualSystem as k, XRHandPoseSystem as l, XRHoverVisualSystem as m, XRInputSystem as n, XRInteractionSystem as o, XRLocomotionSystem as p, XRSessionSystem as q, XRTeleportVisualSystem as r, XR_HOVER_SHELL_FLAG as s, type XrHandedness as t, type XrInputKind as u, readXrCapabilities as v };
960
+ export { AnimationSystem as A, CameraSyncSystem as C, EnvironmentSyncSystem as E, InstancedMeshSystem as I, LightSyncSystem as L, MaterialSyncSystem as M, NO_XR_CAPABILITIES as N, ObjectVisibilitySystem as O, PhysicsSyncSystem as P, SCRIPT_OBJECT_ROOT_FLAG as S, VRTeleportAreaSystem as V, type XrCapabilities as X, type XrInputState as a, type XrHandPoseEventDetail as b, AudioSystem as c, MeshGeometrySystem as d, type ModuleLoader as e, PostprocessingSyncSystem as f, ScriptBehaviourSystem as g, ScriptObjectSystem as h, type SelectionContext as i, VideoSystem as j, XRAnchorSystem as k, XRControllerVisualSystem as l, XREnvironmentSystem as m, XRHandPoseSystem as n, XRHitTestSystem as o, XRHoverVisualSystem as p, XRInputSystem as q, XRInteractionSystem as r, XRLocomotionSystem as s, XRSessionSystem as t, XRTeleportVisualSystem as u, XR_HOVER_SHELL_FLAG as v, type XrHandedness as w, type XrHitResult as x, type XrInputKind as y, readXrCapabilities as z };
@@ -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_POSE_DIRECTIONS, o as DEFAULT_RIGIDBODY_STATE, E as EditableMeshObjectKind, p as EntityType, I as ImageComponent, q as ImageTarget, r as ImageTargetAnchor, s as ImageTargetAnchorOptions, t as ImageTargetReference, u as InstanceSlotComponent, v as InstanceTransform, w as InstancedMeshComponent, x as InstancedMeshKind, L as LightComponent, y as LightValueState, M as MaterialComponent, z as MaterialTypeValue, B as MaterialValueState, F as MeshComponent, G as MeshGeometryComponent, H as MeshGeometryParameters, J as MeshGeometryParametersByKind, K as ModelComponent, N as Name, O as Object3DRef, P as PhysicsComponent, Q as PhysicsState, R as PlaneMeshParameters, S as RadiusHeightMeshParameters, T as RadiusMeshParameters, U as RigidbodyState, V as RigidbodyType, W as ScriptComponent, X as ScriptEntry, Y as ScriptObjectComponent, Z as ScriptObjectComponentInput, _ as ScriptObjectRuntimeState, $ as Selectable, a0 as SelectionTransformState, a1 as SpriteComponent, a2 as TextureFilteringValue, a3 as TransformModeValue, a4 as TransformSpaceValue, a5 as VRTeleportAreaComponent, a6 as VRTeleportAreaOptions, a7 as VideoComponent, a8 as VrTeleportShape, a9 as XRHandPoseComponent, aa as XRHandPoseOptions, ab as XRInteractableComponent, ac as XRInteractableOptions, ad as XRInteractorComponent, ae as XRInteractorOptions, af as XRInteractorSideComponent, ag as XRRigComponent, ah as XRRigOptions, ai as XrAttachPoint, aj as XrDistanceGrabBehavior, ak as XrGrabGesture, al as XrGrabHands, am as XrGrabReach, an as XrHandPoseEntry, ao as XrHandPreset, ap as XrInteractorSide, aq as XrInteractorType, ar as XrLocomotionMode, as as XrTrackingOrigin, at as XrTwoHandRotation, au as createAttachPoint, av as createHandPoseEntry, aw as defaultMaterialValue, ax as handPoseDefinitionFor, ay as normalizePhysicsState, az as setPhysicsLiveRef } from './XRHandPose-CLl4MiHx.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';
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_POSE_DIRECTIONS, o as DEFAULT_RIGIDBODY_STATE, E as EditableMeshObjectKind, p as EntityType, I as ImageComponent, q as ImageTarget, r as ImageTargetAnchor, s as ImageTargetAnchorOptions, t as ImageTargetReference, u as InstanceSlotComponent, v as InstanceTransform, w as InstancedMeshComponent, x as InstancedMeshKind, L as LightComponent, y as LightValueState, M as MaterialComponent, z as MaterialTypeValue, B as MaterialValueState, F as MeshComponent, G as MeshGeometryComponent, H as MeshGeometryParameters, J as MeshGeometryParametersByKind, K as ModelComponent, N as Name, O as Object3DRef, P as PhysicsComponent, Q as PhysicsState, R as PlaneMeshParameters, S as RadiusHeightMeshParameters, T as RadiusMeshParameters, U as RigidbodyState, V as RigidbodyType, W as ScriptComponent, X as ScriptEntry, Y as ScriptObjectComponent, Z as ScriptObjectComponentInput, _ as ScriptObjectRuntimeState, $ as Selectable, a0 as SelectionTransformState, a1 as SpriteComponent, a2 as TextureFilteringValue, a3 as TransformModeValue, a4 as TransformSpaceValue, a5 as VRTeleportAreaComponent, a6 as VRTeleportAreaOptions, a7 as VideoComponent, a8 as VrTeleportShape, a9 as XRAnchorComponent, aa as XRAnchorOptions, ab as XRHandPoseComponent, ac as XRHandPoseOptions, ad as XRInteractableComponent, ae as XRInteractableOptions, af as XRInteractorComponent, ag as XRInteractorOptions, ah as XRInteractorSideComponent, ai as XRRigComponent, aj as XRRigOptions, ak as XrAttachPoint, al as XrDistanceGrabBehavior, am as XrEnvironmentPhysics, an as XrGrabGesture, ao as XrGrabHands, ap as XrGrabReach, aq as XrHandPoseEntry, ar as XrHandPreset, as as XrInteractorSide, at as XrInteractorType, au as XrLocomotionMode, av as XrTrackingOrigin, aw as XrTwoHandRotation, ax as createAttachPoint, ay as createHandPoseEntry, az as defaultMaterialValue, aA as handPoseDefinitionFor, aB as normalizePhysicsState, aC as setPhysicsLiveRef } from './XRHandPose-CxPv-LBo.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-ln4Q7Eot.cjs';
3
3
 
4
4
  /**
5
5
  * Marks the ROOT entity of a prefab instance and records its link to the
@@ -68,6 +68,37 @@ declare class PrefabNode extends Component {
68
68
  constructor(nodeId: string);
69
69
  }
70
70
 
71
+ /** Which WebXR module reported this piece of the room. */
72
+ type XrEnvironmentKind = "plane" | "mesh";
73
+ /** How a detected plane sits in the world, when the runtime says. */
74
+ type XrEnvironmentOrientation = "horizontal" | "vertical";
75
+ /**
76
+ * Marks an entity as a piece of the user's REAL room, detected at runtime.
77
+ *
78
+ * These entities are spawned by `XREnvironmentSystem` from WebXR plane and mesh
79
+ * detection — they are never authored, never saved, and vanish with the session.
80
+ * They exist as ordinary entities (rather than colliders hidden inside a system)
81
+ * so the normal physics pipeline builds their colliders, and so scripts can find
82
+ * them with a plain `world.query(XREnvironmentComponent)`.
83
+ *
84
+ * `semanticLabel` is what makes them useful to a game rather than just solid:
85
+ * it is how a script says "spawn the target on a WALL" or "only drop coins on the
86
+ * FLOOR". It is whatever the runtime reported — commonly `floor`, `wall`,
87
+ * `ceiling`, `table`, `desk`, `couch`, `door`, `window` — and is `null` on
88
+ * runtimes that classify nothing, so always handle the null case.
89
+ *
90
+ * @category Components
91
+ */
92
+ declare class XREnvironmentComponent extends Component {
93
+ /** Whether this came from plane detection or the room mesh. */
94
+ kind: XrEnvironmentKind;
95
+ /** The runtime's classification, or `null` when it did not provide one. */
96
+ semanticLabel: string | null;
97
+ /** Plane orientation, or `null` for mesh geometry and unclassified planes. */
98
+ orientation: XrEnvironmentOrientation | null;
99
+ constructor(kind: XrEnvironmentKind, semanticLabel?: string | null, orientation?: XrEnvironmentOrientation | null);
100
+ }
101
+
71
102
  declare const index_AnimationComponent: typeof AnimationComponent;
72
103
  declare const index_AnimationComponentOptions: typeof AnimationComponentOptions;
73
104
  declare const index_AudioComponent: typeof AudioComponent;
@@ -150,6 +181,10 @@ declare const index_VRTeleportAreaOptions: typeof VRTeleportAreaOptions;
150
181
  declare const index_Vec3: typeof Vec3;
151
182
  declare const index_VideoComponent: typeof VideoComponent;
152
183
  declare const index_VrTeleportShape: typeof VrTeleportShape;
184
+ declare const index_XRAnchorComponent: typeof XRAnchorComponent;
185
+ declare const index_XRAnchorOptions: typeof XRAnchorOptions;
186
+ type index_XREnvironmentComponent = XREnvironmentComponent;
187
+ declare const index_XREnvironmentComponent: typeof XREnvironmentComponent;
153
188
  declare const index_XRHandPoseComponent: typeof XRHandPoseComponent;
154
189
  declare const index_XRHandPoseOptions: typeof XRHandPoseOptions;
155
190
  declare const index_XRInteractableComponent: typeof XRInteractableComponent;
@@ -161,6 +196,9 @@ declare const index_XRRigComponent: typeof XRRigComponent;
161
196
  declare const index_XRRigOptions: typeof XRRigOptions;
162
197
  declare const index_XrAttachPoint: typeof XrAttachPoint;
163
198
  declare const index_XrDistanceGrabBehavior: typeof XrDistanceGrabBehavior;
199
+ type index_XrEnvironmentKind = XrEnvironmentKind;
200
+ type index_XrEnvironmentOrientation = XrEnvironmentOrientation;
201
+ declare const index_XrEnvironmentPhysics: typeof XrEnvironmentPhysics;
164
202
  declare const index_XrGrabGesture: typeof XrGrabGesture;
165
203
  declare const index_XrGrabHands: typeof XrGrabHands;
166
204
  declare const index_XrGrabReach: typeof XrGrabReach;
@@ -178,7 +216,7 @@ declare const index_handPoseDefinitionFor: typeof handPoseDefinitionFor;
178
216
  declare const index_normalizePhysicsState: typeof normalizePhysicsState;
179
217
  declare const index_setPhysicsLiveRef: typeof setPhysicsLiveRef;
180
218
  declare namespace index {
181
- export { index_AnimationComponent as AnimationComponent, index_AnimationComponentOptions as AnimationComponentOptions, index_AudioComponent as AudioComponent, index_CameraComponent as CameraComponent, index_CameraComponentOptions as CameraComponentOptions, index_CameraProjection as CameraProjection, index_CameraRuntimeType as CameraRuntimeType, index_ColliderShape as ColliderShape, index_ColliderState as ColliderState, index_CubeMeshParameters as CubeMeshParameters, index_DEFAULT_COLLIDER_STATE as DEFAULT_COLLIDER_STATE, index_DEFAULT_ENVIRONMENT_STATE as DEFAULT_ENVIRONMENT_STATE, index_DEFAULT_INSTANCED_MESH_PARAMETERS as DEFAULT_INSTANCED_MESH_PARAMETERS, index_DEFAULT_INSTANCE_TRANSFORM as DEFAULT_INSTANCE_TRANSFORM, index_DEFAULT_MESH_GEOMETRY_PARAMETERS as DEFAULT_MESH_GEOMETRY_PARAMETERS, index_DEFAULT_PHYSICS_STATE as DEFAULT_PHYSICS_STATE, index_DEFAULT_POSE_CURLS as DEFAULT_POSE_CURLS, index_DEFAULT_POSE_DIRECTIONS as DEFAULT_POSE_DIRECTIONS, index_DEFAULT_POSTPROCESSING_STATE as DEFAULT_POSTPROCESSING_STATE, index_DEFAULT_RIGIDBODY_STATE as DEFAULT_RIGIDBODY_STATE, index_EditableMeshObjectKind as EditableMeshObjectKind, index_EntityType as EntityType, index_Environment as Environment, index_EnvironmentFogState as EnvironmentFogState, index_EnvironmentFogType as EnvironmentFogType, index_EnvironmentGradientEffect as EnvironmentGradientEffect, index_EnvironmentSkyboxState as EnvironmentSkyboxState, index_EnvironmentSkyboxType as EnvironmentSkyboxType, index_EnvironmentState as EnvironmentState, index_ImageComponent as ImageComponent, index_ImageTarget as ImageTarget, index_ImageTargetAnchor as ImageTargetAnchor, index_ImageTargetAnchorOptions as ImageTargetAnchorOptions, index_ImageTargetReference as ImageTargetReference, index_InstanceSlotComponent as InstanceSlotComponent, index_InstanceTransform as InstanceTransform, index_InstancedMeshComponent as InstancedMeshComponent, index_InstancedMeshKind as InstancedMeshKind, index_LightComponent as LightComponent, index_LightValueState as LightValueState, index_MaterialComponent as MaterialComponent, index_MaterialTypeValue as MaterialTypeValue, index_MaterialValueState as MaterialValueState, index_MeshComponent as MeshComponent, index_MeshGeometryComponent as MeshGeometryComponent, index_MeshGeometryParameters as MeshGeometryParameters, index_MeshGeometryParametersByKind as MeshGeometryParametersByKind, index_ModelComponent as ModelComponent, index_Name as Name, index_Object3DRef as Object3DRef, index_ParentId as ParentId, index_PhysicsComponent as PhysicsComponent, index_PhysicsState as PhysicsState, index_PlaneMeshParameters as PlaneMeshParameters, index_Postprocessing as Postprocessing, index_PostprocessingState as PostprocessingState, index_PrefabInstance as PrefabInstance, index_PrefabNode as PrefabNode, index_RadiusHeightMeshParameters as RadiusHeightMeshParameters, index_RadiusMeshParameters as RadiusMeshParameters, index_RigidbodyState as RigidbodyState, index_RigidbodyType as RigidbodyType, index_ScriptComponent as ScriptComponent, index_ScriptEntry as ScriptEntry, index_ScriptObjectComponent as ScriptObjectComponent, index_ScriptObjectComponentInput as ScriptObjectComponentInput, index_ScriptObjectRuntimeState as ScriptObjectRuntimeState, index_Selectable as Selectable, index_SelectionTransformState as SelectionTransformState, index_SpriteComponent as SpriteComponent, index_TextureFilteringValue as TextureFilteringValue, index_TransformComponent as TransformComponent, index_TransformData as TransformData, index_TransformModeValue as TransformModeValue, index_TransformSpaceValue as TransformSpaceValue, index_VRTeleportAreaComponent as VRTeleportAreaComponent, index_VRTeleportAreaOptions as VRTeleportAreaOptions, index_Vec3 as Vec3, index_VideoComponent as VideoComponent, index_VrTeleportShape as VrTeleportShape, index_XRHandPoseComponent as XRHandPoseComponent, index_XRHandPoseOptions as XRHandPoseOptions, index_XRInteractableComponent as XRInteractableComponent, index_XRInteractableOptions as XRInteractableOptions, index_XRInteractorComponent as XRInteractorComponent, index_XRInteractorOptions as XRInteractorOptions, index_XRInteractorSideComponent as XRInteractorSideComponent, index_XRRigComponent as XRRigComponent, index_XRRigOptions as XRRigOptions, index_XrAttachPoint as XrAttachPoint, index_XrDistanceGrabBehavior as XrDistanceGrabBehavior, index_XrGrabGesture as XrGrabGesture, index_XrGrabHands as XrGrabHands, index_XrGrabReach as XrGrabReach, index_XrHandPoseEntry as XrHandPoseEntry, index_XrHandPreset as XrHandPreset, index_XrInteractorSide as XrInteractorSide, index_XrInteractorType as XrInteractorType, index_XrLocomotionMode as XrLocomotionMode, index_XrTrackingOrigin as XrTrackingOrigin, index_XrTwoHandRotation as XrTwoHandRotation, index_createAttachPoint as createAttachPoint, index_createHandPoseEntry as createHandPoseEntry, index_defaultMaterialValue as defaultMaterialValue, index_handPoseDefinitionFor as handPoseDefinitionFor, index_normalizePhysicsState as normalizePhysicsState, index_setPhysicsLiveRef as setPhysicsLiveRef };
219
+ export { index_AnimationComponent as AnimationComponent, index_AnimationComponentOptions as AnimationComponentOptions, index_AudioComponent as AudioComponent, index_CameraComponent as CameraComponent, index_CameraComponentOptions as CameraComponentOptions, index_CameraProjection as CameraProjection, index_CameraRuntimeType as CameraRuntimeType, index_ColliderShape as ColliderShape, index_ColliderState as ColliderState, index_CubeMeshParameters as CubeMeshParameters, index_DEFAULT_COLLIDER_STATE as DEFAULT_COLLIDER_STATE, index_DEFAULT_ENVIRONMENT_STATE as DEFAULT_ENVIRONMENT_STATE, index_DEFAULT_INSTANCED_MESH_PARAMETERS as DEFAULT_INSTANCED_MESH_PARAMETERS, index_DEFAULT_INSTANCE_TRANSFORM as DEFAULT_INSTANCE_TRANSFORM, index_DEFAULT_MESH_GEOMETRY_PARAMETERS as DEFAULT_MESH_GEOMETRY_PARAMETERS, index_DEFAULT_PHYSICS_STATE as DEFAULT_PHYSICS_STATE, index_DEFAULT_POSE_CURLS as DEFAULT_POSE_CURLS, index_DEFAULT_POSE_DIRECTIONS as DEFAULT_POSE_DIRECTIONS, index_DEFAULT_POSTPROCESSING_STATE as DEFAULT_POSTPROCESSING_STATE, index_DEFAULT_RIGIDBODY_STATE as DEFAULT_RIGIDBODY_STATE, index_EditableMeshObjectKind as EditableMeshObjectKind, index_EntityType as EntityType, index_Environment as Environment, index_EnvironmentFogState as EnvironmentFogState, index_EnvironmentFogType as EnvironmentFogType, index_EnvironmentGradientEffect as EnvironmentGradientEffect, index_EnvironmentSkyboxState as EnvironmentSkyboxState, index_EnvironmentSkyboxType as EnvironmentSkyboxType, index_EnvironmentState as EnvironmentState, index_ImageComponent as ImageComponent, index_ImageTarget as ImageTarget, index_ImageTargetAnchor as ImageTargetAnchor, index_ImageTargetAnchorOptions as ImageTargetAnchorOptions, index_ImageTargetReference as ImageTargetReference, index_InstanceSlotComponent as InstanceSlotComponent, index_InstanceTransform as InstanceTransform, index_InstancedMeshComponent as InstancedMeshComponent, index_InstancedMeshKind as InstancedMeshKind, index_LightComponent as LightComponent, index_LightValueState as LightValueState, index_MaterialComponent as MaterialComponent, index_MaterialTypeValue as MaterialTypeValue, index_MaterialValueState as MaterialValueState, index_MeshComponent as MeshComponent, index_MeshGeometryComponent as MeshGeometryComponent, index_MeshGeometryParameters as MeshGeometryParameters, index_MeshGeometryParametersByKind as MeshGeometryParametersByKind, index_ModelComponent as ModelComponent, index_Name as Name, index_Object3DRef as Object3DRef, index_ParentId as ParentId, index_PhysicsComponent as PhysicsComponent, index_PhysicsState as PhysicsState, index_PlaneMeshParameters as PlaneMeshParameters, index_Postprocessing as Postprocessing, index_PostprocessingState as PostprocessingState, index_PrefabInstance as PrefabInstance, index_PrefabNode as PrefabNode, index_RadiusHeightMeshParameters as RadiusHeightMeshParameters, index_RadiusMeshParameters as RadiusMeshParameters, index_RigidbodyState as RigidbodyState, index_RigidbodyType as RigidbodyType, index_ScriptComponent as ScriptComponent, index_ScriptEntry as ScriptEntry, index_ScriptObjectComponent as ScriptObjectComponent, index_ScriptObjectComponentInput as ScriptObjectComponentInput, index_ScriptObjectRuntimeState as ScriptObjectRuntimeState, index_Selectable as Selectable, index_SelectionTransformState as SelectionTransformState, index_SpriteComponent as SpriteComponent, index_TextureFilteringValue as TextureFilteringValue, index_TransformComponent as TransformComponent, index_TransformData as TransformData, index_TransformModeValue as TransformModeValue, index_TransformSpaceValue as TransformSpaceValue, index_VRTeleportAreaComponent as VRTeleportAreaComponent, index_VRTeleportAreaOptions as VRTeleportAreaOptions, index_Vec3 as Vec3, index_VideoComponent as VideoComponent, index_VrTeleportShape as VrTeleportShape, index_XRAnchorComponent as XRAnchorComponent, index_XRAnchorOptions as XRAnchorOptions, index_XREnvironmentComponent as XREnvironmentComponent, index_XRHandPoseComponent as XRHandPoseComponent, index_XRHandPoseOptions as XRHandPoseOptions, index_XRInteractableComponent as XRInteractableComponent, index_XRInteractableOptions as XRInteractableOptions, index_XRInteractorComponent as XRInteractorComponent, index_XRInteractorOptions as XRInteractorOptions, index_XRInteractorSideComponent as XRInteractorSideComponent, index_XRRigComponent as XRRigComponent, index_XRRigOptions as XRRigOptions, index_XrAttachPoint as XrAttachPoint, index_XrDistanceGrabBehavior as XrDistanceGrabBehavior, type index_XrEnvironmentKind as XrEnvironmentKind, type index_XrEnvironmentOrientation as XrEnvironmentOrientation, index_XrEnvironmentPhysics as XrEnvironmentPhysics, index_XrGrabGesture as XrGrabGesture, index_XrGrabHands as XrGrabHands, index_XrGrabReach as XrGrabReach, index_XrHandPoseEntry as XrHandPoseEntry, index_XrHandPreset as XrHandPreset, index_XrInteractorSide as XrInteractorSide, index_XrInteractorType as XrInteractorType, index_XrLocomotionMode as XrLocomotionMode, index_XrTrackingOrigin as XrTrackingOrigin, index_XrTwoHandRotation as XrTwoHandRotation, index_createAttachPoint as createAttachPoint, index_createHandPoseEntry as createHandPoseEntry, index_defaultMaterialValue as defaultMaterialValue, index_handPoseDefinitionFor as handPoseDefinitionFor, index_normalizePhysicsState as normalizePhysicsState, index_setPhysicsLiveRef as setPhysicsLiveRef };
182
220
  }
183
221
 
184
- export { PrefabInstance as P, PrefabNode as a, index as i };
222
+ export { PrefabInstance as P, XREnvironmentComponent as X, PrefabNode as a, type XrEnvironmentKind as b, type XrEnvironmentOrientation as c, index as i };
@@ -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_POSE_DIRECTIONS, o as DEFAULT_RIGIDBODY_STATE, E as EditableMeshObjectKind, p as EntityType, I as ImageComponent, q as ImageTarget, r as ImageTargetAnchor, s as ImageTargetAnchorOptions, t as ImageTargetReference, u as InstanceSlotComponent, v as InstanceTransform, w as InstancedMeshComponent, x as InstancedMeshKind, L as LightComponent, y as LightValueState, M as MaterialComponent, z as MaterialTypeValue, B as MaterialValueState, F as MeshComponent, G as MeshGeometryComponent, H as MeshGeometryParameters, J as MeshGeometryParametersByKind, K as ModelComponent, N as Name, O as Object3DRef, P as PhysicsComponent, Q as PhysicsState, R as PlaneMeshParameters, S as RadiusHeightMeshParameters, T as RadiusMeshParameters, U as RigidbodyState, V as RigidbodyType, W as ScriptComponent, X as ScriptEntry, Y as ScriptObjectComponent, Z as ScriptObjectComponentInput, _ as ScriptObjectRuntimeState, $ as Selectable, a0 as SelectionTransformState, a1 as SpriteComponent, a2 as TextureFilteringValue, a3 as TransformModeValue, a4 as TransformSpaceValue, a5 as VRTeleportAreaComponent, a6 as VRTeleportAreaOptions, a7 as VideoComponent, a8 as VrTeleportShape, a9 as XRHandPoseComponent, aa as XRHandPoseOptions, ab as XRInteractableComponent, ac as XRInteractableOptions, ad as XRInteractorComponent, ae as XRInteractorOptions, af as XRInteractorSideComponent, ag as XRRigComponent, ah as XRRigOptions, ai as XrAttachPoint, aj as XrDistanceGrabBehavior, ak as XrGrabGesture, al as XrGrabHands, am as XrGrabReach, an as XrHandPoseEntry, ao as XrHandPreset, ap as XrInteractorSide, aq as XrInteractorType, ar as XrLocomotionMode, as as XrTrackingOrigin, at as XrTwoHandRotation, au as createAttachPoint, av as createHandPoseEntry, aw as defaultMaterialValue, ax as handPoseDefinitionFor, ay as normalizePhysicsState, az as setPhysicsLiveRef } from './XRHandPose-CrzI57JA.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';
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_POSE_DIRECTIONS, o as DEFAULT_RIGIDBODY_STATE, E as EditableMeshObjectKind, p as EntityType, I as ImageComponent, q as ImageTarget, r as ImageTargetAnchor, s as ImageTargetAnchorOptions, t as ImageTargetReference, u as InstanceSlotComponent, v as InstanceTransform, w as InstancedMeshComponent, x as InstancedMeshKind, L as LightComponent, y as LightValueState, M as MaterialComponent, z as MaterialTypeValue, B as MaterialValueState, F as MeshComponent, G as MeshGeometryComponent, H as MeshGeometryParameters, J as MeshGeometryParametersByKind, K as ModelComponent, N as Name, O as Object3DRef, P as PhysicsComponent, Q as PhysicsState, R as PlaneMeshParameters, S as RadiusHeightMeshParameters, T as RadiusMeshParameters, U as RigidbodyState, V as RigidbodyType, W as ScriptComponent, X as ScriptEntry, Y as ScriptObjectComponent, Z as ScriptObjectComponentInput, _ as ScriptObjectRuntimeState, $ as Selectable, a0 as SelectionTransformState, a1 as SpriteComponent, a2 as TextureFilteringValue, a3 as TransformModeValue, a4 as TransformSpaceValue, a5 as VRTeleportAreaComponent, a6 as VRTeleportAreaOptions, a7 as VideoComponent, a8 as VrTeleportShape, a9 as XRAnchorComponent, aa as XRAnchorOptions, ab as XRHandPoseComponent, ac as XRHandPoseOptions, ad as XRInteractableComponent, ae as XRInteractableOptions, af as XRInteractorComponent, ag as XRInteractorOptions, ah as XRInteractorSideComponent, ai as XRRigComponent, aj as XRRigOptions, ak as XrAttachPoint, al as XrDistanceGrabBehavior, am as XrEnvironmentPhysics, an as XrGrabGesture, ao as XrGrabHands, ap as XrGrabReach, aq as XrHandPoseEntry, ar as XrHandPreset, as as XrInteractorSide, at as XrInteractorType, au as XrLocomotionMode, av as XrTrackingOrigin, aw as XrTwoHandRotation, ax as createAttachPoint, ay as createHandPoseEntry, az as defaultMaterialValue, aA as handPoseDefinitionFor, aB as normalizePhysicsState, aC as setPhysicsLiveRef } from './XRHandPose-BImIa4ZS.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-ln4Q7Eot.js';
3
3
 
4
4
  /**
5
5
  * Marks the ROOT entity of a prefab instance and records its link to the
@@ -68,6 +68,37 @@ declare class PrefabNode extends Component {
68
68
  constructor(nodeId: string);
69
69
  }
70
70
 
71
+ /** Which WebXR module reported this piece of the room. */
72
+ type XrEnvironmentKind = "plane" | "mesh";
73
+ /** How a detected plane sits in the world, when the runtime says. */
74
+ type XrEnvironmentOrientation = "horizontal" | "vertical";
75
+ /**
76
+ * Marks an entity as a piece of the user's REAL room, detected at runtime.
77
+ *
78
+ * These entities are spawned by `XREnvironmentSystem` from WebXR plane and mesh
79
+ * detection — they are never authored, never saved, and vanish with the session.
80
+ * They exist as ordinary entities (rather than colliders hidden inside a system)
81
+ * so the normal physics pipeline builds their colliders, and so scripts can find
82
+ * them with a plain `world.query(XREnvironmentComponent)`.
83
+ *
84
+ * `semanticLabel` is what makes them useful to a game rather than just solid:
85
+ * it is how a script says "spawn the target on a WALL" or "only drop coins on the
86
+ * FLOOR". It is whatever the runtime reported — commonly `floor`, `wall`,
87
+ * `ceiling`, `table`, `desk`, `couch`, `door`, `window` — and is `null` on
88
+ * runtimes that classify nothing, so always handle the null case.
89
+ *
90
+ * @category Components
91
+ */
92
+ declare class XREnvironmentComponent extends Component {
93
+ /** Whether this came from plane detection or the room mesh. */
94
+ kind: XrEnvironmentKind;
95
+ /** The runtime's classification, or `null` when it did not provide one. */
96
+ semanticLabel: string | null;
97
+ /** Plane orientation, or `null` for mesh geometry and unclassified planes. */
98
+ orientation: XrEnvironmentOrientation | null;
99
+ constructor(kind: XrEnvironmentKind, semanticLabel?: string | null, orientation?: XrEnvironmentOrientation | null);
100
+ }
101
+
71
102
  declare const index_AnimationComponent: typeof AnimationComponent;
72
103
  declare const index_AnimationComponentOptions: typeof AnimationComponentOptions;
73
104
  declare const index_AudioComponent: typeof AudioComponent;
@@ -150,6 +181,10 @@ declare const index_VRTeleportAreaOptions: typeof VRTeleportAreaOptions;
150
181
  declare const index_Vec3: typeof Vec3;
151
182
  declare const index_VideoComponent: typeof VideoComponent;
152
183
  declare const index_VrTeleportShape: typeof VrTeleportShape;
184
+ declare const index_XRAnchorComponent: typeof XRAnchorComponent;
185
+ declare const index_XRAnchorOptions: typeof XRAnchorOptions;
186
+ type index_XREnvironmentComponent = XREnvironmentComponent;
187
+ declare const index_XREnvironmentComponent: typeof XREnvironmentComponent;
153
188
  declare const index_XRHandPoseComponent: typeof XRHandPoseComponent;
154
189
  declare const index_XRHandPoseOptions: typeof XRHandPoseOptions;
155
190
  declare const index_XRInteractableComponent: typeof XRInteractableComponent;
@@ -161,6 +196,9 @@ declare const index_XRRigComponent: typeof XRRigComponent;
161
196
  declare const index_XRRigOptions: typeof XRRigOptions;
162
197
  declare const index_XrAttachPoint: typeof XrAttachPoint;
163
198
  declare const index_XrDistanceGrabBehavior: typeof XrDistanceGrabBehavior;
199
+ type index_XrEnvironmentKind = XrEnvironmentKind;
200
+ type index_XrEnvironmentOrientation = XrEnvironmentOrientation;
201
+ declare const index_XrEnvironmentPhysics: typeof XrEnvironmentPhysics;
164
202
  declare const index_XrGrabGesture: typeof XrGrabGesture;
165
203
  declare const index_XrGrabHands: typeof XrGrabHands;
166
204
  declare const index_XrGrabReach: typeof XrGrabReach;
@@ -178,7 +216,7 @@ declare const index_handPoseDefinitionFor: typeof handPoseDefinitionFor;
178
216
  declare const index_normalizePhysicsState: typeof normalizePhysicsState;
179
217
  declare const index_setPhysicsLiveRef: typeof setPhysicsLiveRef;
180
218
  declare namespace index {
181
- export { index_AnimationComponent as AnimationComponent, index_AnimationComponentOptions as AnimationComponentOptions, index_AudioComponent as AudioComponent, index_CameraComponent as CameraComponent, index_CameraComponentOptions as CameraComponentOptions, index_CameraProjection as CameraProjection, index_CameraRuntimeType as CameraRuntimeType, index_ColliderShape as ColliderShape, index_ColliderState as ColliderState, index_CubeMeshParameters as CubeMeshParameters, index_DEFAULT_COLLIDER_STATE as DEFAULT_COLLIDER_STATE, index_DEFAULT_ENVIRONMENT_STATE as DEFAULT_ENVIRONMENT_STATE, index_DEFAULT_INSTANCED_MESH_PARAMETERS as DEFAULT_INSTANCED_MESH_PARAMETERS, index_DEFAULT_INSTANCE_TRANSFORM as DEFAULT_INSTANCE_TRANSFORM, index_DEFAULT_MESH_GEOMETRY_PARAMETERS as DEFAULT_MESH_GEOMETRY_PARAMETERS, index_DEFAULT_PHYSICS_STATE as DEFAULT_PHYSICS_STATE, index_DEFAULT_POSE_CURLS as DEFAULT_POSE_CURLS, index_DEFAULT_POSE_DIRECTIONS as DEFAULT_POSE_DIRECTIONS, index_DEFAULT_POSTPROCESSING_STATE as DEFAULT_POSTPROCESSING_STATE, index_DEFAULT_RIGIDBODY_STATE as DEFAULT_RIGIDBODY_STATE, index_EditableMeshObjectKind as EditableMeshObjectKind, index_EntityType as EntityType, index_Environment as Environment, index_EnvironmentFogState as EnvironmentFogState, index_EnvironmentFogType as EnvironmentFogType, index_EnvironmentGradientEffect as EnvironmentGradientEffect, index_EnvironmentSkyboxState as EnvironmentSkyboxState, index_EnvironmentSkyboxType as EnvironmentSkyboxType, index_EnvironmentState as EnvironmentState, index_ImageComponent as ImageComponent, index_ImageTarget as ImageTarget, index_ImageTargetAnchor as ImageTargetAnchor, index_ImageTargetAnchorOptions as ImageTargetAnchorOptions, index_ImageTargetReference as ImageTargetReference, index_InstanceSlotComponent as InstanceSlotComponent, index_InstanceTransform as InstanceTransform, index_InstancedMeshComponent as InstancedMeshComponent, index_InstancedMeshKind as InstancedMeshKind, index_LightComponent as LightComponent, index_LightValueState as LightValueState, index_MaterialComponent as MaterialComponent, index_MaterialTypeValue as MaterialTypeValue, index_MaterialValueState as MaterialValueState, index_MeshComponent as MeshComponent, index_MeshGeometryComponent as MeshGeometryComponent, index_MeshGeometryParameters as MeshGeometryParameters, index_MeshGeometryParametersByKind as MeshGeometryParametersByKind, index_ModelComponent as ModelComponent, index_Name as Name, index_Object3DRef as Object3DRef, index_ParentId as ParentId, index_PhysicsComponent as PhysicsComponent, index_PhysicsState as PhysicsState, index_PlaneMeshParameters as PlaneMeshParameters, index_Postprocessing as Postprocessing, index_PostprocessingState as PostprocessingState, index_PrefabInstance as PrefabInstance, index_PrefabNode as PrefabNode, index_RadiusHeightMeshParameters as RadiusHeightMeshParameters, index_RadiusMeshParameters as RadiusMeshParameters, index_RigidbodyState as RigidbodyState, index_RigidbodyType as RigidbodyType, index_ScriptComponent as ScriptComponent, index_ScriptEntry as ScriptEntry, index_ScriptObjectComponent as ScriptObjectComponent, index_ScriptObjectComponentInput as ScriptObjectComponentInput, index_ScriptObjectRuntimeState as ScriptObjectRuntimeState, index_Selectable as Selectable, index_SelectionTransformState as SelectionTransformState, index_SpriteComponent as SpriteComponent, index_TextureFilteringValue as TextureFilteringValue, index_TransformComponent as TransformComponent, index_TransformData as TransformData, index_TransformModeValue as TransformModeValue, index_TransformSpaceValue as TransformSpaceValue, index_VRTeleportAreaComponent as VRTeleportAreaComponent, index_VRTeleportAreaOptions as VRTeleportAreaOptions, index_Vec3 as Vec3, index_VideoComponent as VideoComponent, index_VrTeleportShape as VrTeleportShape, index_XRHandPoseComponent as XRHandPoseComponent, index_XRHandPoseOptions as XRHandPoseOptions, index_XRInteractableComponent as XRInteractableComponent, index_XRInteractableOptions as XRInteractableOptions, index_XRInteractorComponent as XRInteractorComponent, index_XRInteractorOptions as XRInteractorOptions, index_XRInteractorSideComponent as XRInteractorSideComponent, index_XRRigComponent as XRRigComponent, index_XRRigOptions as XRRigOptions, index_XrAttachPoint as XrAttachPoint, index_XrDistanceGrabBehavior as XrDistanceGrabBehavior, index_XrGrabGesture as XrGrabGesture, index_XrGrabHands as XrGrabHands, index_XrGrabReach as XrGrabReach, index_XrHandPoseEntry as XrHandPoseEntry, index_XrHandPreset as XrHandPreset, index_XrInteractorSide as XrInteractorSide, index_XrInteractorType as XrInteractorType, index_XrLocomotionMode as XrLocomotionMode, index_XrTrackingOrigin as XrTrackingOrigin, index_XrTwoHandRotation as XrTwoHandRotation, index_createAttachPoint as createAttachPoint, index_createHandPoseEntry as createHandPoseEntry, index_defaultMaterialValue as defaultMaterialValue, index_handPoseDefinitionFor as handPoseDefinitionFor, index_normalizePhysicsState as normalizePhysicsState, index_setPhysicsLiveRef as setPhysicsLiveRef };
219
+ export { index_AnimationComponent as AnimationComponent, index_AnimationComponentOptions as AnimationComponentOptions, index_AudioComponent as AudioComponent, index_CameraComponent as CameraComponent, index_CameraComponentOptions as CameraComponentOptions, index_CameraProjection as CameraProjection, index_CameraRuntimeType as CameraRuntimeType, index_ColliderShape as ColliderShape, index_ColliderState as ColliderState, index_CubeMeshParameters as CubeMeshParameters, index_DEFAULT_COLLIDER_STATE as DEFAULT_COLLIDER_STATE, index_DEFAULT_ENVIRONMENT_STATE as DEFAULT_ENVIRONMENT_STATE, index_DEFAULT_INSTANCED_MESH_PARAMETERS as DEFAULT_INSTANCED_MESH_PARAMETERS, index_DEFAULT_INSTANCE_TRANSFORM as DEFAULT_INSTANCE_TRANSFORM, index_DEFAULT_MESH_GEOMETRY_PARAMETERS as DEFAULT_MESH_GEOMETRY_PARAMETERS, index_DEFAULT_PHYSICS_STATE as DEFAULT_PHYSICS_STATE, index_DEFAULT_POSE_CURLS as DEFAULT_POSE_CURLS, index_DEFAULT_POSE_DIRECTIONS as DEFAULT_POSE_DIRECTIONS, index_DEFAULT_POSTPROCESSING_STATE as DEFAULT_POSTPROCESSING_STATE, index_DEFAULT_RIGIDBODY_STATE as DEFAULT_RIGIDBODY_STATE, index_EditableMeshObjectKind as EditableMeshObjectKind, index_EntityType as EntityType, index_Environment as Environment, index_EnvironmentFogState as EnvironmentFogState, index_EnvironmentFogType as EnvironmentFogType, index_EnvironmentGradientEffect as EnvironmentGradientEffect, index_EnvironmentSkyboxState as EnvironmentSkyboxState, index_EnvironmentSkyboxType as EnvironmentSkyboxType, index_EnvironmentState as EnvironmentState, index_ImageComponent as ImageComponent, index_ImageTarget as ImageTarget, index_ImageTargetAnchor as ImageTargetAnchor, index_ImageTargetAnchorOptions as ImageTargetAnchorOptions, index_ImageTargetReference as ImageTargetReference, index_InstanceSlotComponent as InstanceSlotComponent, index_InstanceTransform as InstanceTransform, index_InstancedMeshComponent as InstancedMeshComponent, index_InstancedMeshKind as InstancedMeshKind, index_LightComponent as LightComponent, index_LightValueState as LightValueState, index_MaterialComponent as MaterialComponent, index_MaterialTypeValue as MaterialTypeValue, index_MaterialValueState as MaterialValueState, index_MeshComponent as MeshComponent, index_MeshGeometryComponent as MeshGeometryComponent, index_MeshGeometryParameters as MeshGeometryParameters, index_MeshGeometryParametersByKind as MeshGeometryParametersByKind, index_ModelComponent as ModelComponent, index_Name as Name, index_Object3DRef as Object3DRef, index_ParentId as ParentId, index_PhysicsComponent as PhysicsComponent, index_PhysicsState as PhysicsState, index_PlaneMeshParameters as PlaneMeshParameters, index_Postprocessing as Postprocessing, index_PostprocessingState as PostprocessingState, index_PrefabInstance as PrefabInstance, index_PrefabNode as PrefabNode, index_RadiusHeightMeshParameters as RadiusHeightMeshParameters, index_RadiusMeshParameters as RadiusMeshParameters, index_RigidbodyState as RigidbodyState, index_RigidbodyType as RigidbodyType, index_ScriptComponent as ScriptComponent, index_ScriptEntry as ScriptEntry, index_ScriptObjectComponent as ScriptObjectComponent, index_ScriptObjectComponentInput as ScriptObjectComponentInput, index_ScriptObjectRuntimeState as ScriptObjectRuntimeState, index_Selectable as Selectable, index_SelectionTransformState as SelectionTransformState, index_SpriteComponent as SpriteComponent, index_TextureFilteringValue as TextureFilteringValue, index_TransformComponent as TransformComponent, index_TransformData as TransformData, index_TransformModeValue as TransformModeValue, index_TransformSpaceValue as TransformSpaceValue, index_VRTeleportAreaComponent as VRTeleportAreaComponent, index_VRTeleportAreaOptions as VRTeleportAreaOptions, index_Vec3 as Vec3, index_VideoComponent as VideoComponent, index_VrTeleportShape as VrTeleportShape, index_XRAnchorComponent as XRAnchorComponent, index_XRAnchorOptions as XRAnchorOptions, index_XREnvironmentComponent as XREnvironmentComponent, index_XRHandPoseComponent as XRHandPoseComponent, index_XRHandPoseOptions as XRHandPoseOptions, index_XRInteractableComponent as XRInteractableComponent, index_XRInteractableOptions as XRInteractableOptions, index_XRInteractorComponent as XRInteractorComponent, index_XRInteractorOptions as XRInteractorOptions, index_XRInteractorSideComponent as XRInteractorSideComponent, index_XRRigComponent as XRRigComponent, index_XRRigOptions as XRRigOptions, index_XrAttachPoint as XrAttachPoint, index_XrDistanceGrabBehavior as XrDistanceGrabBehavior, type index_XrEnvironmentKind as XrEnvironmentKind, type index_XrEnvironmentOrientation as XrEnvironmentOrientation, index_XrEnvironmentPhysics as XrEnvironmentPhysics, index_XrGrabGesture as XrGrabGesture, index_XrGrabHands as XrGrabHands, index_XrGrabReach as XrGrabReach, index_XrHandPoseEntry as XrHandPoseEntry, index_XrHandPreset as XrHandPreset, index_XrInteractorSide as XrInteractorSide, index_XrInteractorType as XrInteractorType, index_XrLocomotionMode as XrLocomotionMode, index_XrTrackingOrigin as XrTrackingOrigin, index_XrTwoHandRotation as XrTwoHandRotation, index_createAttachPoint as createAttachPoint, index_createHandPoseEntry as createHandPoseEntry, index_defaultMaterialValue as defaultMaterialValue, index_handPoseDefinitionFor as handPoseDefinitionFor, index_normalizePhysicsState as normalizePhysicsState, index_setPhysicsLiveRef as setPhysicsLiveRef };
182
220
  }
183
221
 
184
- export { PrefabInstance as P, PrefabNode as a, index as i };
222
+ export { PrefabInstance as P, XREnvironmentComponent as X, PrefabNode as a, type XrEnvironmentKind as b, type XrEnvironmentOrientation as c, index as i };
@@ -1,4 +1,4 @@
1
- import { k as EcsSystem, l as World } from './System-BhnLw0fZ.js';
1
+ import { k as EcsSystem, l as World, r as EntityId } from './System-ln4Q7Eot.js';
2
2
  import * as THREE from 'three';
3
3
  import { m as XrHandJoints, r as XrHandShape } from './handPose-DlcTtqgx.js';
4
4
 
@@ -28,6 +28,8 @@ declare class EnvironmentSyncSystem implements EcsSystem {
28
28
  private signature;
29
29
  private activeTexture;
30
30
  private pendingImageUrl;
31
+ /** Whether the skybox is currently withheld because passthrough is on. */
32
+ private passthroughSuppressed;
31
33
  constructor(scene: THREE.Scene);
32
34
  private disposeActiveTexture;
33
35
  private applySkybox;
@@ -682,6 +684,96 @@ declare class XRSessionSystem implements EcsSystem {
682
684
  getInputs(): XrInputState[];
683
685
  }
684
686
 
687
+ declare class XREnvironmentSystem implements EcsSystem {
688
+ /** Keyed by the XRPlane/XRMesh object itself — the runtime's own identity. */
689
+ private readonly planes;
690
+ private readonly meshes;
691
+ private presenting;
692
+ private debugVisible;
693
+ update(world: World): void;
694
+ /** How many pieces of real geometry are currently colliding. Script-facing. */
695
+ getDetectedCount(): {
696
+ planes: number;
697
+ meshes: number;
698
+ };
699
+ private findRig;
700
+ private syncPlanes;
701
+ private syncMeshes;
702
+ private createPlaneEntity;
703
+ private applyPlaneCollider;
704
+ private createMeshEntity;
705
+ /** A thin box so a detected plane can be SEEN, not just collided with. */
706
+ private attachPlaneDebug;
707
+ private applyPose;
708
+ private applyDebugVisibility;
709
+ private destroyEntry;
710
+ private clearMap;
711
+ private clearAll;
712
+ dispose(world: World): void;
713
+ }
714
+
715
+ /**
716
+ * Answers "where does this ray meet the real world?".
717
+ *
718
+ * Physics colliders (`XREnvironmentSystem`) tell you what the room IS; hit-test
719
+ * tells you where a specific ray lands on it, which is what placement needs —
720
+ * dropping a model onto a real table, or showing a reticle on the floor where
721
+ * content will spawn. It works even where plane and mesh detection are not
722
+ * granted, because the runtime answers from its own understanding of the scene
723
+ * rather than from geometry it has handed over.
724
+ *
725
+ * Two kinds of target are tracked:
726
+ *
727
+ * - `"viewer"` — straight ahead from the headset. The reticle case.
728
+ * - a handedness — along that controller's or hand's pointing ray.
729
+ *
730
+ * Sources are requested ASYNCHRONOUSLY, so a result is null for the first few
731
+ * frames after a session starts, and null again whenever the ray happens to
732
+ * point at nothing the runtime recognises. Callers must handle null every frame
733
+ * rather than caching the first hit.
734
+ */
735
+ /** Where a ray met the real world. */
736
+ type XrHitResult = {
737
+ position: THREE.Vector3;
738
+ quaternion: THREE.Quaternion;
739
+ };
740
+ type TargetKey = "viewer" | XrHandedness;
741
+ declare class XRHitTestSystem implements EcsSystem {
742
+ private readonly sources;
743
+ /** Targets whose async request is in flight, so it is not fired twice. */
744
+ private readonly pending;
745
+ private readonly results;
746
+ private presenting;
747
+ private enabled;
748
+ update(world: World): void;
749
+ /**
750
+ * Where the given ray meets the real world this frame, or null.
751
+ *
752
+ * Null is the normal case, not an error: the source may still be being
753
+ * requested, the ray may point at nothing recognised, or the runtime may not
754
+ * have granted `hit-test` at all.
755
+ */
756
+ getHitResult(target?: TargetKey): XrHitResult | null;
757
+ private rigWantsHitTest;
758
+ private ensureViewerSource;
759
+ private ensureInputSources;
760
+ private teardown;
761
+ dispose(): void;
762
+ }
763
+
764
+ declare class XRAnchorSystem implements EcsSystem {
765
+ private readonly anchors;
766
+ /** In-flight creations, so one entity is not anchored twice. */
767
+ private readonly pending;
768
+ private presenting;
769
+ update(world: World): void;
770
+ /** Whether this entity's pose is currently being driven by an anchor. */
771
+ isAnchored(entityId: EntityId): boolean;
772
+ private requestAnchor;
773
+ private releaseAll;
774
+ dispose(): void;
775
+ }
776
+
685
777
  declare class VRTeleportAreaSystem implements EcsSystem {
686
778
  private readonly signatures;
687
779
  update(world: World): void;
@@ -865,4 +957,4 @@ declare class XRHoverVisualSystem implements EcsSystem {
865
957
  dispose(): void;
866
958
  }
867
959
 
868
- export { AnimationSystem as A, CameraSyncSystem as C, EnvironmentSyncSystem as E, InstancedMeshSystem as I, LightSyncSystem as L, MaterialSyncSystem as M, NO_XR_CAPABILITIES as N, ObjectVisibilitySystem as O, PhysicsSyncSystem as P, SCRIPT_OBJECT_ROOT_FLAG as S, VRTeleportAreaSystem as V, type XrCapabilities as X, type XrInputState as a, type XrHandPoseEventDetail as b, AudioSystem as c, MeshGeometrySystem as d, type ModuleLoader as e, PostprocessingSyncSystem as f, ScriptBehaviourSystem as g, ScriptObjectSystem as h, type SelectionContext as i, VideoSystem as j, XRControllerVisualSystem as k, XRHandPoseSystem as l, XRHoverVisualSystem as m, XRInputSystem as n, XRInteractionSystem as o, XRLocomotionSystem as p, XRSessionSystem as q, XRTeleportVisualSystem as r, XR_HOVER_SHELL_FLAG as s, type XrHandedness as t, type XrInputKind as u, readXrCapabilities as v };
960
+ export { AnimationSystem as A, CameraSyncSystem as C, EnvironmentSyncSystem as E, InstancedMeshSystem as I, LightSyncSystem as L, MaterialSyncSystem as M, NO_XR_CAPABILITIES as N, ObjectVisibilitySystem as O, PhysicsSyncSystem as P, SCRIPT_OBJECT_ROOT_FLAG as S, VRTeleportAreaSystem as V, type XrCapabilities as X, type XrInputState as a, type XrHandPoseEventDetail as b, AudioSystem as c, MeshGeometrySystem as d, type ModuleLoader as e, PostprocessingSyncSystem as f, ScriptBehaviourSystem as g, ScriptObjectSystem as h, type SelectionContext as i, VideoSystem as j, XRAnchorSystem as k, XRControllerVisualSystem as l, XREnvironmentSystem as m, XRHandPoseSystem as n, XRHitTestSystem as o, XRHoverVisualSystem as p, XRInputSystem as q, XRInteractionSystem as r, XRLocomotionSystem as s, XRSessionSystem as t, XRTeleportVisualSystem as u, XR_HOVER_SHELL_FLAG as v, type XrHandedness as w, type XrHitResult as x, type XrInputKind as y, readXrCapabilities as z };