@relu-interactives/spatial-ecs 0.3.7 → 0.3.9

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 (47) hide show
  1. package/dist/{System-TmC2EijF.d.cts → System-31wk-A0g.d.cts} +1 -1
  2. package/dist/{System-TmC2EijF.d.ts → System-31wk-A0g.d.ts} +1 -1
  3. package/dist/{XRInteractor-CCUzSqg9.d.ts → XRHandPose-CxPz8VBp.d.ts} +139 -20
  4. package/dist/{XRInteractor-I2q6TKtF.d.cts → XRHandPose-VuSbe4iz.d.cts} +139 -20
  5. package/dist/{chunk-FQTOC7HK.js → chunk-KIKIWCEB.js} +14 -5
  6. package/dist/chunk-KIKIWCEB.js.map +1 -0
  7. package/dist/{chunk-N4GKZ7IV.js → chunk-KVGGAL5V.js} +227 -3
  8. package/dist/chunk-KVGGAL5V.js.map +1 -0
  9. package/dist/{chunk-JRJ3CL5H.js → chunk-L5BP727H.js} +3 -3
  10. package/dist/{chunk-JRJ3CL5H.js.map → chunk-L5BP727H.js.map} +1 -1
  11. package/dist/{chunk-O6FJA4XW.js → chunk-W5TSYV6Q.js} +946 -50
  12. package/dist/chunk-W5TSYV6Q.js.map +1 -0
  13. package/dist/components/index.cjs +98 -0
  14. package/dist/components/index.cjs.map +1 -1
  15. package/dist/components/index.d.cts +4 -3
  16. package/dist/components/index.d.ts +4 -3
  17. package/dist/components/index.js +1 -1
  18. package/dist/docs/guide/vr-and-hand-poses.md +111 -0
  19. package/dist/factories/index.cjs +58 -0
  20. package/dist/factories/index.cjs.map +1 -1
  21. package/dist/factories/index.d.cts +6 -3
  22. package/dist/factories/index.d.ts +6 -3
  23. package/dist/factories/index.js +3 -3
  24. package/dist/handPose-dFxqbFFY.d.cts +240 -0
  25. package/dist/handPose-dFxqbFFY.d.ts +240 -0
  26. package/dist/{index-BltjPEhg.d.cts → index-BIQoaKAA.d.cts} +9 -3
  27. package/dist/{index-W8pUajCW.d.ts → index-BxdXgqiI.d.ts} +9 -3
  28. package/dist/{index-_q9TVDI5.d.ts → index-C7XQyrgE.d.ts} +79 -7
  29. package/dist/{index-B9nwRDf9.d.cts → index-DyN50JZo.d.cts} +79 -7
  30. package/dist/index.cjs +1205 -45
  31. package/dist/index.cjs.map +1 -1
  32. package/dist/index.d.cts +118 -9
  33. package/dist/index.d.ts +118 -9
  34. package/dist/index.js +8 -8
  35. package/dist/systems/index.cjs +1161 -45
  36. package/dist/systems/index.cjs.map +1 -1
  37. package/dist/systems/index.d.cts +3 -2
  38. package/dist/systems/index.d.ts +3 -2
  39. package/dist/systems/index.js +3 -3
  40. package/dist/types.d.cts +1 -1
  41. package/dist/types.d.ts +1 -1
  42. package/dist/worldSnapshotUtils.d.cts +1 -1
  43. package/dist/worldSnapshotUtils.d.ts +1 -1
  44. package/package.json +1 -1
  45. package/dist/chunk-FQTOC7HK.js.map +0 -1
  46. package/dist/chunk-N4GKZ7IV.js.map +0 -1
  47. package/dist/chunk-O6FJA4XW.js.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,13 +1,15 @@
1
- import { k as EcsSystem, C as Component, W as WorldEntityView, T as TransformComponent, l as World, S as SpawnPrefabSource, m as SpawnPrefabOptions, n as ComponentClass, o as ParentLookup, p as EcsEntityKind, O as ObjectManagementSystem, q as SubtreeSnapshot, r as EntityId, s as ExternalRefWarning } from './System-TmC2EijF.cjs';
2
- export { A as AssetInput, t as CheckboxInput, u as ColorInput, v as ComponentFactory, w as ComponentInput, x as ComponentKind, y as DropdownInput, z as DropdownOption, B as EcsComponentFactoryKind, F as EcsEntityEditorKind, G as EntityInput, H as FloatInput, I as InputSystem, J as IntersectionResult, K as KeyboardKey, L as KeyboardKeys, M as MouseButton, N as PREFAB_FILE_VERSION, Q as PREFAB_FILE_VERSION_NESTED, R as PrefabAsset, U as RemapSnapshotOptions, X as RenderSystem, Y as SelectionListener, Z as SliderInput, _ as TextInput, $ as ToggleInput, a0 as TransformSyncSystem, a1 as Vec3, a2 as Vector2Input, a3 as Vector3Input, a4 as clearPrefabCache, a5 as despawnPrefab, a6 as loadPrefab, a7 as parsePrefabAsset, a8 as prefabFileVersionFor, a9 as remapSnapshotEntityIds, aa as setPrefabAssetUrlResolver, ab as spawnPrefab } from './System-TmC2EijF.cjs';
1
+ import { k as EcsSystem, C as Component, W as WorldEntityView, T as TransformComponent, l as World, S as SpawnPrefabSource, m as SpawnPrefabOptions, n as ComponentClass, o as ParentLookup, p as EcsEntityKind, O as ObjectManagementSystem, q as SubtreeSnapshot, r as EntityId, s as ExternalRefWarning } from './System-31wk-A0g.cjs';
2
+ export { A as AssetInput, t as CheckboxInput, u as ColorInput, v as ComponentFactory, w as ComponentInput, x as ComponentKind, y as DropdownInput, z as DropdownOption, B as EcsComponentFactoryKind, F as EcsEntityEditorKind, G as EntityInput, H as FloatInput, I as InputSystem, J as IntersectionResult, K as KeyboardKey, L as KeyboardKeys, M as MouseButton, N as PREFAB_FILE_VERSION, Q as PREFAB_FILE_VERSION_NESTED, R as PrefabAsset, U as RemapSnapshotOptions, X as RenderSystem, Y as SelectionListener, Z as SliderInput, _ as TextInput, $ as ToggleInput, a0 as TransformSyncSystem, a1 as Vec3, a2 as Vector2Input, a3 as Vector3Input, a4 as clearPrefabCache, a5 as despawnPrefab, a6 as loadPrefab, a7 as parsePrefabAsset, a8 as prefabFileVersionFor, a9 as remapSnapshotEntityIds, aa as setPrefabAssetUrlResolver, ab as spawnPrefab } from './System-31wk-A0g.cjs';
3
3
  import * as THREE from 'three';
4
- import { O as Object3DRef, af as XrHandPreset } from './XRInteractor-I2q6TKtF.cjs';
5
- export { an as AnimationStateCallbacks, ao as AnimationStateMachine, ap as AnimationStateManager, aq as StateMachine } from './XRInteractor-I2q6TKtF.cjs';
6
- import { X as XrCapabilities, a as XrInputState } from './index-B9nwRDf9.cjs';
7
- export { A as AnimationSystem, b as AudioSystem, C as CameraSyncSystem, E as EnvironmentSyncSystem, I as InstancedMeshSystem, L as LightSyncSystem, M as MaterialSyncSystem, c as MeshGeometrySystem, d as ModuleLoader, N as NO_XR_CAPABILITIES, O as ObjectVisibilitySystem, P as PhysicsSyncSystem, e as PostprocessingSyncSystem, S as SCRIPT_OBJECT_ROOT_FLAG, f as ScriptBehaviourSystem, g as ScriptObjectSystem, h as SelectionContext, V as VRTeleportAreaSystem, i as VideoSystem, j as XRControllerVisualSystem, k as XRInputSystem, l as XRInteractionSystem, m as XRLocomotionSystem, n as XRSessionSystem, o as XRTeleportVisualSystem, p as XrHandedness, q as XrInputKind, r as readXrCapabilities } from './index-B9nwRDf9.cjs';
8
- export { i as CoreComponents } from './index-BltjPEhg.cjs';
9
- 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, createXRInteractableComponent, createXRInteractorComponent, createXRInteractorSideComponent, createXRRigComponent, registerDefaultComponentFactories, registerDefaultFactories } from './factories/index.cjs';
4
+ import { O as Object3DRef, aj as XrHandPreset } from './XRHandPose-VuSbe4iz.cjs';
5
+ export { at as AnimationStateCallbacks, au as AnimationStateMachine, av as AnimationStateManager, aw as StateMachine } from './XRHandPose-VuSbe4iz.cjs';
6
+ import { X as XrCapabilities, a as XrInputState, b as XrHandPoseEventDetail } from './index-DyN50JZo.cjs';
7
+ export { A as AnimationSystem, c as AudioSystem, C as CameraSyncSystem, E as EnvironmentSyncSystem, I as InstancedMeshSystem, L as LightSyncSystem, M as MaterialSyncSystem, d as MeshGeometrySystem, e as ModuleLoader, N as NO_XR_CAPABILITIES, O as ObjectVisibilitySystem, P as PhysicsSyncSystem, f as PostprocessingSyncSystem, S as SCRIPT_OBJECT_ROOT_FLAG, g as ScriptBehaviourSystem, h as ScriptObjectSystem, i as SelectionContext, V as VRTeleportAreaSystem, j as VideoSystem, k as XRControllerVisualSystem, l as XRHandPoseSystem, m as XRInputSystem, n as XRInteractionSystem, o as XRLocomotionSystem, p as XRSessionSystem, q as XRTeleportVisualSystem, r as XrHandedness, s as XrInputKind, t as readXrCapabilities } from './index-DyN50JZo.cjs';
8
+ export { i as CoreComponents } from './index-BIQoaKAA.cjs';
9
+ 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 './factories/index.cjs';
10
10
  import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
11
+ import { X as XrHandPoseDefinition, a as XrFinger, b as XrHandPoseOrientation } from './handPose-dFxqbFFY.cjs';
12
+ export { C as CURLED_COS, D as DEFAULT_ENTER_CONFIDENCE, c as DEFAULT_EXIT_CONFIDENCE, d as DEFAULT_LOST_GRACE_SECONDS, e as DEFAULT_MIN_HOLD_SECONDS, F as FALLBACK_HAND_SCALE, H as HandPoseTracker, f as HandPoseTrackerOptions, M as MATCH_FALLOFF, P as PINCH_FINGERS, S as STRAIGHT_COS, g as XR_FINGERS, h as XrFingerCurl, i as XrFingerTarget, j as XrHandJointName, k as XrHandJoints, l as XrHandPoseAxis, m as XrHandPoseContext, n as XrHandPoseDirection, o as XrHandPoseEvent, p as XrHandPoseMatch, q as XrHandShape, r as XrPalmPose, s as computeFingerCurl, t as computeHandShape, u as computePalmPose, v as computePalmWidth, w as computePinch, x as computeSpread, y as estimateHandScale, z as matchHandPose } from './handPose-dFxqbFFY.cjs';
11
13
  import '@dimforge/rapier3d-compat';
12
14
 
13
15
  interface CustomEcsSystem extends EcsSystem {
@@ -301,6 +303,15 @@ declare class Behaviour implements CustomEcsSystem {
301
303
  *
302
304
  * @param input - The source doing the grabbing.
303
305
  */
306
+ /**
307
+ * A hand pose declared on this entity started being held.
308
+ *
309
+ * Fires once the pose has been sustained for its hold time, not the instant
310
+ * the fingers pass through it.
311
+ */
312
+ onHandPoseStart(_event: XrHandPoseEventDetail): void;
313
+ /** A held hand pose ended, or its hand stopped being tracked. */
314
+ onHandPoseEnd(_event: XrHandPoseEventDetail): void;
304
315
  onGrab(input: XrInputState): void;
305
316
  /** Called when this entity is released. Optional XR hook. */
306
317
  onRelease(input: XrInputState): void;
@@ -431,6 +442,7 @@ type ComponentValueMaps = {
431
442
  vrTeleportAreaValues: Map<number, unknown>;
432
443
  xrInteractableValues: Map<number, unknown>;
433
444
  xrInteractorValues: Map<number, unknown>;
445
+ xrHandPoseValues: Map<number, unknown>;
434
446
  xrInteractorSideValues: Map<number, unknown>;
435
447
  instancedMeshValues: Map<number, unknown>;
436
448
  instanceSlotValues: Map<number, unknown>;
@@ -810,4 +822,101 @@ declare function createHandMaterial(preset: XrHandPreset, options: HandMaterialO
810
822
  /** Apply a preset material to every mesh under a hand model. */
811
823
  declare function applyHandMaterial(root: THREE.Object3D, material: THREE.Material): void;
812
824
 
813
- export { ADDED_NODE_MARKER_COMPONENT, ARC_GRAVITY, ARC_MAX_TIME, ARC_SPEED, ARC_STEPS, type ApplyPrefabToSnapshotResult, Behaviour, Component, type ComponentValueMaps, EcsEntityKind, EcsSystem, type EcsWorldComponentSnapshot, type EcsWorldStateSnapshotLike, EntityId, ExternalRefWarning, HYDRATABLE_ENTITY_KINDS, type HandMaterialOptions, type HydrateOptions, type HydrateWorldFromSnapshotResult, type InstantiateSubtreeResult, NODE_KEY_SEPARATOR, type NestedRegion, type NodeKeyMaps, type NodeMaps, OVERRIDE_DIFF_EXCLUDED_COMPONENTS, OVERRIDE_ROOT_EXCLUDED_COMPONENTS, ObjectManagementSystem, ParentLookup, SHARED_MODEL_RESOURCE_FLAG, ScriptObject, type SerializeEntitySubtreeResult, SpawnPrefabOptions, SpawnPrefabSource, SubtreeSnapshot, World, WorldEntityView, XrCapabilities, XrInputState, applyHandMaterial, applyPrefabToSnapshotInstances, arcGroundCrossing, buildComponentValueMaps, buildNodeKeyMapsFromSnapshot, buildNodeMapsFromSnapshot, canonicalizeComponentValue, clearModelCache, collectDiffPaths, collectDirectPrefabDependencies, collectEntitySubtree, collectSnapshotSubtreeIds, computeInstanceOverrides, createHandMaterial, decanonicalizeComponentValue, encodeOverride, findSnapshotRootEntityIds, findTopLevelNestedRegions, groupOverridePaths, hydrateWorldFromSnapshot, hydrateWorldFromSnapshotDetailed, indexSnapshotByEntity, instantiateSubtree, loadSharedGltf, mergeComponentValue, parseOverride, resolveDracoDecoderPath, restoreComponentState, restorePostCreateComponents, sampleTeleportArc, serializeEntitySubtree, setDracoDecoderPath };
825
+ /**
826
+ * Built-in poses, keyed by id.
827
+ *
828
+ * The set covers the industry consensus (fist, open palm, point, thumbs up,
829
+ * pinch) plus the widely-requested ones the major toolkits omit — OK sign and
830
+ * gun — and the expressive extras that read well in social VR.
831
+ */
832
+ declare const HAND_POSE_PRESETS: Record<string, XrHandPoseDefinition>;
833
+ /** Preset ids, in the order the editor lists them. */
834
+ declare const HAND_POSE_PRESET_IDS: readonly string[];
835
+ /**
836
+ * A deep copy of a preset.
837
+ *
838
+ * Returned by value because scenes edit their poses: handing out the shared
839
+ * object would let one scene's tweak leak into every other pose in the app.
840
+ */
841
+ declare function getHandPosePreset(id: string): XrHandPoseDefinition | null;
842
+ declare function cloneHandPose(definition: XrHandPoseDefinition): XrHandPoseDefinition;
843
+ /**
844
+ * Build a pose from five curl values — the shape the editor's sliders and the
845
+ * AI tools produce.
846
+ */
847
+ declare function handPoseFromCurls(id: string, name: string, curls: Record<XrFinger, number>, options?: {
848
+ tolerance?: number;
849
+ pinch?: XrHandPoseDefinition["pinch"];
850
+ orientation?: XrHandPoseOrientation;
851
+ hand?: "left" | "right";
852
+ }): XrHandPoseDefinition;
853
+
854
+ /**
855
+ * Estimates release velocity for thrown objects.
856
+ *
857
+ * Naively differencing the last two frames produces terrible throws: a single
858
+ * noisy sample (or the tiny decelerating motion as the user opens their hand)
859
+ * lands right on the release frame and the object dribbles out. Real throws are
860
+ * recovered by looking back over a short WINDOW and taking the best of it — the
861
+ * approach every mature VR toolkit converges on.
862
+ *
863
+ * Pure and frame-rate independent so throw feel can be unit-tested without a
864
+ * headset.
865
+ */
866
+ /** Samples retained. ~5 frames ≈ 55ms at 90Hz — long enough to smooth noise. */
867
+ declare const VELOCITY_SAMPLES = 5;
868
+ /**
869
+ * Samples older than this are ignored on release.
870
+ *
871
+ * Without it, pausing mid-grab then opening your hand would throw using motion
872
+ * from before the pause.
873
+ */
874
+ declare const MAX_SAMPLE_AGE_SECONDS = 0.2;
875
+ /**
876
+ * Fastest hand motion treated as real, in metres/second.
877
+ *
878
+ * Samples are recorded in WORLD space, so anything that moves the XR rig while
879
+ * an object is held — teleport, snap turn — relocates the hand instantly and
880
+ * implies an enormous velocity. Releasing after a teleport would otherwise
881
+ * launch the object out of the world.
882
+ *
883
+ * A very hard human throw is under ~15 m/s; a teleport across a room in one
884
+ * frame is hundreds. The gap is wide enough that one threshold separates them
885
+ * cleanly, and it also absorbs the frame-timing glitches that produce the same
886
+ * artefact on standalone headsets.
887
+ */
888
+ declare const MAX_PLAUSIBLE_SPEED = 20;
889
+ type VelocitySample = {
890
+ position: THREE.Vector3;
891
+ /** Seconds, monotonically increasing. */
892
+ time: number;
893
+ };
894
+ /**
895
+ * Rolling buffer of hand positions used to recover throw velocity.
896
+ *
897
+ * One per active grab; cleared on release.
898
+ */
899
+ declare class ThrowVelocityTracker {
900
+ private readonly samples;
901
+ /** Record where the hand is now. Call once per frame while held. */
902
+ record(position: THREE.Vector3, time: number): void;
903
+ /**
904
+ * Velocity to release with, in metres/second.
905
+ *
906
+ * Uses the FASTEST segment inside the window rather than the most recent or
907
+ * the window average. Users decelerate as they open their hand, so the last
908
+ * segment understates the throw and the average washes it out; peak speed is
909
+ * what matches the motion the user actually felt they made.
910
+ */
911
+ computeVelocity(now: number): THREE.Vector3;
912
+ clear(): void;
913
+ }
914
+ /**
915
+ * Angular velocity from a rotation delta, as an axis-angle vector (rad/s).
916
+ *
917
+ * Spin makes a thrown ball read as thrown rather than launched, and it is what
918
+ * lets a scene do curve shots or spinning props.
919
+ */
920
+ declare function angularVelocityFrom(previous: THREE.Quaternion, current: THREE.Quaternion, deltaTime: number): THREE.Vector3;
921
+
922
+ export { ADDED_NODE_MARKER_COMPONENT, ARC_GRAVITY, ARC_MAX_TIME, ARC_SPEED, ARC_STEPS, type ApplyPrefabToSnapshotResult, Behaviour, Component, type ComponentValueMaps, EcsEntityKind, EcsSystem, type EcsWorldComponentSnapshot, type EcsWorldStateSnapshotLike, EntityId, ExternalRefWarning, HAND_POSE_PRESETS, HAND_POSE_PRESET_IDS, HYDRATABLE_ENTITY_KINDS, type HandMaterialOptions, type HydrateOptions, type HydrateWorldFromSnapshotResult, type InstantiateSubtreeResult, MAX_PLAUSIBLE_SPEED, MAX_SAMPLE_AGE_SECONDS, NODE_KEY_SEPARATOR, type NestedRegion, type NodeKeyMaps, type NodeMaps, OVERRIDE_DIFF_EXCLUDED_COMPONENTS, OVERRIDE_ROOT_EXCLUDED_COMPONENTS, ObjectManagementSystem, ParentLookup, SHARED_MODEL_RESOURCE_FLAG, ScriptObject, type SerializeEntitySubtreeResult, SpawnPrefabOptions, SpawnPrefabSource, SubtreeSnapshot, ThrowVelocityTracker, VELOCITY_SAMPLES, type VelocitySample, World, WorldEntityView, XrCapabilities, XrFinger, XrHandPoseDefinition, XrHandPoseEventDetail, XrHandPoseOrientation, XrInputState, angularVelocityFrom, applyHandMaterial, applyPrefabToSnapshotInstances, arcGroundCrossing, buildComponentValueMaps, buildNodeKeyMapsFromSnapshot, buildNodeMapsFromSnapshot, canonicalizeComponentValue, clearModelCache, cloneHandPose, collectDiffPaths, collectDirectPrefabDependencies, collectEntitySubtree, collectSnapshotSubtreeIds, computeInstanceOverrides, createHandMaterial, decanonicalizeComponentValue, encodeOverride, findSnapshotRootEntityIds, findTopLevelNestedRegions, getHandPosePreset, groupOverridePaths, handPoseFromCurls, hydrateWorldFromSnapshot, hydrateWorldFromSnapshotDetailed, indexSnapshotByEntity, instantiateSubtree, loadSharedGltf, mergeComponentValue, parseOverride, resolveDracoDecoderPath, restoreComponentState, restorePostCreateComponents, sampleTeleportArc, serializeEntitySubtree, setDracoDecoderPath };
package/dist/index.d.ts CHANGED
@@ -1,13 +1,15 @@
1
- import { k as EcsSystem, C as Component, W as WorldEntityView, T as TransformComponent, l as World, S as SpawnPrefabSource, m as SpawnPrefabOptions, n as ComponentClass, o as ParentLookup, p as EcsEntityKind, O as ObjectManagementSystem, q as SubtreeSnapshot, r as EntityId, s as ExternalRefWarning } from './System-TmC2EijF.js';
2
- export { A as AssetInput, t as CheckboxInput, u as ColorInput, v as ComponentFactory, w as ComponentInput, x as ComponentKind, y as DropdownInput, z as DropdownOption, B as EcsComponentFactoryKind, F as EcsEntityEditorKind, G as EntityInput, H as FloatInput, I as InputSystem, J as IntersectionResult, K as KeyboardKey, L as KeyboardKeys, M as MouseButton, N as PREFAB_FILE_VERSION, Q as PREFAB_FILE_VERSION_NESTED, R as PrefabAsset, U as RemapSnapshotOptions, X as RenderSystem, Y as SelectionListener, Z as SliderInput, _ as TextInput, $ as ToggleInput, a0 as TransformSyncSystem, a1 as Vec3, a2 as Vector2Input, a3 as Vector3Input, a4 as clearPrefabCache, a5 as despawnPrefab, a6 as loadPrefab, a7 as parsePrefabAsset, a8 as prefabFileVersionFor, a9 as remapSnapshotEntityIds, aa as setPrefabAssetUrlResolver, ab as spawnPrefab } from './System-TmC2EijF.js';
1
+ import { k as EcsSystem, C as Component, W as WorldEntityView, T as TransformComponent, l as World, S as SpawnPrefabSource, m as SpawnPrefabOptions, n as ComponentClass, o as ParentLookup, p as EcsEntityKind, O as ObjectManagementSystem, q as SubtreeSnapshot, r as EntityId, s as ExternalRefWarning } from './System-31wk-A0g.js';
2
+ export { A as AssetInput, t as CheckboxInput, u as ColorInput, v as ComponentFactory, w as ComponentInput, x as ComponentKind, y as DropdownInput, z as DropdownOption, B as EcsComponentFactoryKind, F as EcsEntityEditorKind, G as EntityInput, H as FloatInput, I as InputSystem, J as IntersectionResult, K as KeyboardKey, L as KeyboardKeys, M as MouseButton, N as PREFAB_FILE_VERSION, Q as PREFAB_FILE_VERSION_NESTED, R as PrefabAsset, U as RemapSnapshotOptions, X as RenderSystem, Y as SelectionListener, Z as SliderInput, _ as TextInput, $ as ToggleInput, a0 as TransformSyncSystem, a1 as Vec3, a2 as Vector2Input, a3 as Vector3Input, a4 as clearPrefabCache, a5 as despawnPrefab, a6 as loadPrefab, a7 as parsePrefabAsset, a8 as prefabFileVersionFor, a9 as remapSnapshotEntityIds, aa as setPrefabAssetUrlResolver, ab as spawnPrefab } from './System-31wk-A0g.js';
3
3
  import * as THREE from 'three';
4
- import { O as Object3DRef, af as XrHandPreset } from './XRInteractor-CCUzSqg9.js';
5
- export { an as AnimationStateCallbacks, ao as AnimationStateMachine, ap as AnimationStateManager, aq as StateMachine } from './XRInteractor-CCUzSqg9.js';
6
- import { X as XrCapabilities, a as XrInputState } from './index-_q9TVDI5.js';
7
- export { A as AnimationSystem, b as AudioSystem, C as CameraSyncSystem, E as EnvironmentSyncSystem, I as InstancedMeshSystem, L as LightSyncSystem, M as MaterialSyncSystem, c as MeshGeometrySystem, d as ModuleLoader, N as NO_XR_CAPABILITIES, O as ObjectVisibilitySystem, P as PhysicsSyncSystem, e as PostprocessingSyncSystem, S as SCRIPT_OBJECT_ROOT_FLAG, f as ScriptBehaviourSystem, g as ScriptObjectSystem, h as SelectionContext, V as VRTeleportAreaSystem, i as VideoSystem, j as XRControllerVisualSystem, k as XRInputSystem, l as XRInteractionSystem, m as XRLocomotionSystem, n as XRSessionSystem, o as XRTeleportVisualSystem, p as XrHandedness, q as XrInputKind, r as readXrCapabilities } from './index-_q9TVDI5.js';
8
- export { i as CoreComponents } from './index-W8pUajCW.js';
9
- 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, createXRInteractableComponent, createXRInteractorComponent, createXRInteractorSideComponent, createXRRigComponent, registerDefaultComponentFactories, registerDefaultFactories } from './factories/index.js';
4
+ import { O as Object3DRef, aj as XrHandPreset } from './XRHandPose-CxPz8VBp.js';
5
+ export { at as AnimationStateCallbacks, au as AnimationStateMachine, av as AnimationStateManager, aw as StateMachine } from './XRHandPose-CxPz8VBp.js';
6
+ import { X as XrCapabilities, a as XrInputState, b as XrHandPoseEventDetail } from './index-C7XQyrgE.js';
7
+ export { A as AnimationSystem, c as AudioSystem, C as CameraSyncSystem, E as EnvironmentSyncSystem, I as InstancedMeshSystem, L as LightSyncSystem, M as MaterialSyncSystem, d as MeshGeometrySystem, e as ModuleLoader, N as NO_XR_CAPABILITIES, O as ObjectVisibilitySystem, P as PhysicsSyncSystem, f as PostprocessingSyncSystem, S as SCRIPT_OBJECT_ROOT_FLAG, g as ScriptBehaviourSystem, h as ScriptObjectSystem, i as SelectionContext, V as VRTeleportAreaSystem, j as VideoSystem, k as XRControllerVisualSystem, l as XRHandPoseSystem, m as XRInputSystem, n as XRInteractionSystem, o as XRLocomotionSystem, p as XRSessionSystem, q as XRTeleportVisualSystem, r as XrHandedness, s as XrInputKind, t as readXrCapabilities } from './index-C7XQyrgE.js';
8
+ export { i as CoreComponents } from './index-BxdXgqiI.js';
9
+ 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 './factories/index.js';
10
10
  import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
11
+ import { X as XrHandPoseDefinition, a as XrFinger, b as XrHandPoseOrientation } from './handPose-dFxqbFFY.js';
12
+ export { C as CURLED_COS, D as DEFAULT_ENTER_CONFIDENCE, c as DEFAULT_EXIT_CONFIDENCE, d as DEFAULT_LOST_GRACE_SECONDS, e as DEFAULT_MIN_HOLD_SECONDS, F as FALLBACK_HAND_SCALE, H as HandPoseTracker, f as HandPoseTrackerOptions, M as MATCH_FALLOFF, P as PINCH_FINGERS, S as STRAIGHT_COS, g as XR_FINGERS, h as XrFingerCurl, i as XrFingerTarget, j as XrHandJointName, k as XrHandJoints, l as XrHandPoseAxis, m as XrHandPoseContext, n as XrHandPoseDirection, o as XrHandPoseEvent, p as XrHandPoseMatch, q as XrHandShape, r as XrPalmPose, s as computeFingerCurl, t as computeHandShape, u as computePalmPose, v as computePalmWidth, w as computePinch, x as computeSpread, y as estimateHandScale, z as matchHandPose } from './handPose-dFxqbFFY.js';
11
13
  import '@dimforge/rapier3d-compat';
12
14
 
13
15
  interface CustomEcsSystem extends EcsSystem {
@@ -301,6 +303,15 @@ declare class Behaviour implements CustomEcsSystem {
301
303
  *
302
304
  * @param input - The source doing the grabbing.
303
305
  */
306
+ /**
307
+ * A hand pose declared on this entity started being held.
308
+ *
309
+ * Fires once the pose has been sustained for its hold time, not the instant
310
+ * the fingers pass through it.
311
+ */
312
+ onHandPoseStart(_event: XrHandPoseEventDetail): void;
313
+ /** A held hand pose ended, or its hand stopped being tracked. */
314
+ onHandPoseEnd(_event: XrHandPoseEventDetail): void;
304
315
  onGrab(input: XrInputState): void;
305
316
  /** Called when this entity is released. Optional XR hook. */
306
317
  onRelease(input: XrInputState): void;
@@ -431,6 +442,7 @@ type ComponentValueMaps = {
431
442
  vrTeleportAreaValues: Map<number, unknown>;
432
443
  xrInteractableValues: Map<number, unknown>;
433
444
  xrInteractorValues: Map<number, unknown>;
445
+ xrHandPoseValues: Map<number, unknown>;
434
446
  xrInteractorSideValues: Map<number, unknown>;
435
447
  instancedMeshValues: Map<number, unknown>;
436
448
  instanceSlotValues: Map<number, unknown>;
@@ -810,4 +822,101 @@ declare function createHandMaterial(preset: XrHandPreset, options: HandMaterialO
810
822
  /** Apply a preset material to every mesh under a hand model. */
811
823
  declare function applyHandMaterial(root: THREE.Object3D, material: THREE.Material): void;
812
824
 
813
- export { ADDED_NODE_MARKER_COMPONENT, ARC_GRAVITY, ARC_MAX_TIME, ARC_SPEED, ARC_STEPS, type ApplyPrefabToSnapshotResult, Behaviour, Component, type ComponentValueMaps, EcsEntityKind, EcsSystem, type EcsWorldComponentSnapshot, type EcsWorldStateSnapshotLike, EntityId, ExternalRefWarning, HYDRATABLE_ENTITY_KINDS, type HandMaterialOptions, type HydrateOptions, type HydrateWorldFromSnapshotResult, type InstantiateSubtreeResult, NODE_KEY_SEPARATOR, type NestedRegion, type NodeKeyMaps, type NodeMaps, OVERRIDE_DIFF_EXCLUDED_COMPONENTS, OVERRIDE_ROOT_EXCLUDED_COMPONENTS, ObjectManagementSystem, ParentLookup, SHARED_MODEL_RESOURCE_FLAG, ScriptObject, type SerializeEntitySubtreeResult, SpawnPrefabOptions, SpawnPrefabSource, SubtreeSnapshot, World, WorldEntityView, XrCapabilities, XrInputState, applyHandMaterial, applyPrefabToSnapshotInstances, arcGroundCrossing, buildComponentValueMaps, buildNodeKeyMapsFromSnapshot, buildNodeMapsFromSnapshot, canonicalizeComponentValue, clearModelCache, collectDiffPaths, collectDirectPrefabDependencies, collectEntitySubtree, collectSnapshotSubtreeIds, computeInstanceOverrides, createHandMaterial, decanonicalizeComponentValue, encodeOverride, findSnapshotRootEntityIds, findTopLevelNestedRegions, groupOverridePaths, hydrateWorldFromSnapshot, hydrateWorldFromSnapshotDetailed, indexSnapshotByEntity, instantiateSubtree, loadSharedGltf, mergeComponentValue, parseOverride, resolveDracoDecoderPath, restoreComponentState, restorePostCreateComponents, sampleTeleportArc, serializeEntitySubtree, setDracoDecoderPath };
825
+ /**
826
+ * Built-in poses, keyed by id.
827
+ *
828
+ * The set covers the industry consensus (fist, open palm, point, thumbs up,
829
+ * pinch) plus the widely-requested ones the major toolkits omit — OK sign and
830
+ * gun — and the expressive extras that read well in social VR.
831
+ */
832
+ declare const HAND_POSE_PRESETS: Record<string, XrHandPoseDefinition>;
833
+ /** Preset ids, in the order the editor lists them. */
834
+ declare const HAND_POSE_PRESET_IDS: readonly string[];
835
+ /**
836
+ * A deep copy of a preset.
837
+ *
838
+ * Returned by value because scenes edit their poses: handing out the shared
839
+ * object would let one scene's tweak leak into every other pose in the app.
840
+ */
841
+ declare function getHandPosePreset(id: string): XrHandPoseDefinition | null;
842
+ declare function cloneHandPose(definition: XrHandPoseDefinition): XrHandPoseDefinition;
843
+ /**
844
+ * Build a pose from five curl values — the shape the editor's sliders and the
845
+ * AI tools produce.
846
+ */
847
+ declare function handPoseFromCurls(id: string, name: string, curls: Record<XrFinger, number>, options?: {
848
+ tolerance?: number;
849
+ pinch?: XrHandPoseDefinition["pinch"];
850
+ orientation?: XrHandPoseOrientation;
851
+ hand?: "left" | "right";
852
+ }): XrHandPoseDefinition;
853
+
854
+ /**
855
+ * Estimates release velocity for thrown objects.
856
+ *
857
+ * Naively differencing the last two frames produces terrible throws: a single
858
+ * noisy sample (or the tiny decelerating motion as the user opens their hand)
859
+ * lands right on the release frame and the object dribbles out. Real throws are
860
+ * recovered by looking back over a short WINDOW and taking the best of it — the
861
+ * approach every mature VR toolkit converges on.
862
+ *
863
+ * Pure and frame-rate independent so throw feel can be unit-tested without a
864
+ * headset.
865
+ */
866
+ /** Samples retained. ~5 frames ≈ 55ms at 90Hz — long enough to smooth noise. */
867
+ declare const VELOCITY_SAMPLES = 5;
868
+ /**
869
+ * Samples older than this are ignored on release.
870
+ *
871
+ * Without it, pausing mid-grab then opening your hand would throw using motion
872
+ * from before the pause.
873
+ */
874
+ declare const MAX_SAMPLE_AGE_SECONDS = 0.2;
875
+ /**
876
+ * Fastest hand motion treated as real, in metres/second.
877
+ *
878
+ * Samples are recorded in WORLD space, so anything that moves the XR rig while
879
+ * an object is held — teleport, snap turn — relocates the hand instantly and
880
+ * implies an enormous velocity. Releasing after a teleport would otherwise
881
+ * launch the object out of the world.
882
+ *
883
+ * A very hard human throw is under ~15 m/s; a teleport across a room in one
884
+ * frame is hundreds. The gap is wide enough that one threshold separates them
885
+ * cleanly, and it also absorbs the frame-timing glitches that produce the same
886
+ * artefact on standalone headsets.
887
+ */
888
+ declare const MAX_PLAUSIBLE_SPEED = 20;
889
+ type VelocitySample = {
890
+ position: THREE.Vector3;
891
+ /** Seconds, monotonically increasing. */
892
+ time: number;
893
+ };
894
+ /**
895
+ * Rolling buffer of hand positions used to recover throw velocity.
896
+ *
897
+ * One per active grab; cleared on release.
898
+ */
899
+ declare class ThrowVelocityTracker {
900
+ private readonly samples;
901
+ /** Record where the hand is now. Call once per frame while held. */
902
+ record(position: THREE.Vector3, time: number): void;
903
+ /**
904
+ * Velocity to release with, in metres/second.
905
+ *
906
+ * Uses the FASTEST segment inside the window rather than the most recent or
907
+ * the window average. Users decelerate as they open their hand, so the last
908
+ * segment understates the throw and the average washes it out; peak speed is
909
+ * what matches the motion the user actually felt they made.
910
+ */
911
+ computeVelocity(now: number): THREE.Vector3;
912
+ clear(): void;
913
+ }
914
+ /**
915
+ * Angular velocity from a rotation delta, as an axis-angle vector (rad/s).
916
+ *
917
+ * Spin makes a thrown ball read as thrown rather than launched, and it is what
918
+ * lets a scene do curve shots or spinning props.
919
+ */
920
+ declare function angularVelocityFrom(previous: THREE.Quaternion, current: THREE.Quaternion, deltaTime: number): THREE.Vector3;
921
+
922
+ export { ADDED_NODE_MARKER_COMPONENT, ARC_GRAVITY, ARC_MAX_TIME, ARC_SPEED, ARC_STEPS, type ApplyPrefabToSnapshotResult, Behaviour, Component, type ComponentValueMaps, EcsEntityKind, EcsSystem, type EcsWorldComponentSnapshot, type EcsWorldStateSnapshotLike, EntityId, ExternalRefWarning, HAND_POSE_PRESETS, HAND_POSE_PRESET_IDS, HYDRATABLE_ENTITY_KINDS, type HandMaterialOptions, type HydrateOptions, type HydrateWorldFromSnapshotResult, type InstantiateSubtreeResult, MAX_PLAUSIBLE_SPEED, MAX_SAMPLE_AGE_SECONDS, NODE_KEY_SEPARATOR, type NestedRegion, type NodeKeyMaps, type NodeMaps, OVERRIDE_DIFF_EXCLUDED_COMPONENTS, OVERRIDE_ROOT_EXCLUDED_COMPONENTS, ObjectManagementSystem, ParentLookup, SHARED_MODEL_RESOURCE_FLAG, ScriptObject, type SerializeEntitySubtreeResult, SpawnPrefabOptions, SpawnPrefabSource, SubtreeSnapshot, ThrowVelocityTracker, VELOCITY_SAMPLES, type VelocitySample, World, WorldEntityView, XrCapabilities, XrFinger, XrHandPoseDefinition, XrHandPoseEventDetail, XrHandPoseOrientation, XrInputState, angularVelocityFrom, applyHandMaterial, applyPrefabToSnapshotInstances, arcGroundCrossing, buildComponentValueMaps, buildNodeKeyMapsFromSnapshot, buildNodeMapsFromSnapshot, canonicalizeComponentValue, clearModelCache, cloneHandPose, collectDiffPaths, collectDirectPrefabDependencies, collectEntitySubtree, collectSnapshotSubtreeIds, computeInstanceOverrides, createHandMaterial, decanonicalizeComponentValue, encodeOverride, findSnapshotRootEntityIds, findTopLevelNestedRegions, getHandPosePreset, groupOverridePaths, handPoseFromCurls, hydrateWorldFromSnapshot, hydrateWorldFromSnapshotDetailed, indexSnapshotByEntity, instantiateSubtree, loadSharedGltf, mergeComponentValue, parseOverride, resolveDracoDecoderPath, restoreComponentState, restorePostCreateComponents, sampleTeleportArc, serializeEntitySubtree, setDracoDecoderPath };
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import { MeshGeometrySystem, InstancedMeshSystem, EnvironmentSyncSystem, PostprocessingSyncSystem, LightSyncSystem, MaterialSyncSystem, VRTeleportAreaSystem, PhysicsSyncSystem, AnimationSystem, AudioSystem, VideoSystem, CameraSyncSystem, TransformSyncSystem, ObjectVisibilitySystem, RenderSystem, spawnPrefab, despawnPrefab, buildNodeKeyMapsFromSnapshot, indexSnapshotByEntity, findTopLevelNestedRegions, collectSnapshotSubtreeIds, groupOverridePaths, OVERRIDE_DIFF_EXCLUDED_COMPONENTS, OVERRIDE_ROOT_EXCLUDED_COMPONENTS, canonicalizeComponentValue, mergeComponentValue, decanonicalizeComponentValue, computeInstanceOverrides, collectEntitySubtree, ADDED_NODE_MARKER_COMPONENT } from './chunk-O6FJA4XW.js';
2
- export { ADDED_NODE_MARKER_COMPONENT, ARC_GRAVITY, ARC_MAX_TIME, ARC_SPEED, ARC_STEPS, AnimationSystem, AudioSystem, Behaviour, CameraSyncSystem, EnvironmentSyncSystem, HYDRATABLE_ENTITY_KINDS, InputSystem, InstancedMeshSystem, KeyboardKeys, LightSyncSystem, MaterialSyncSystem, MeshGeometrySystem, NODE_KEY_SEPARATOR, NO_XR_CAPABILITIES, OVERRIDE_DIFF_EXCLUDED_COMPONENTS, OVERRIDE_ROOT_EXCLUDED_COMPONENTS, ObjectVisibilitySystem, PREFAB_FILE_VERSION, PREFAB_FILE_VERSION_NESTED, PhysicsSyncSystem, PostprocessingSyncSystem, RenderSystem, SCRIPT_OBJECT_ROOT_FLAG, ScriptBehaviourSystem, ScriptObject, ScriptObjectSystem, TransformSyncSystem, VRTeleportAreaSystem, VideoSystem, XRControllerVisualSystem, XRInputSystem, XRInteractionSystem, XRLocomotionSystem, XRSessionSystem, XRTeleportVisualSystem, applyHandMaterial, arcGroundCrossing, buildComponentValueMaps, buildNodeKeyMapsFromSnapshot, buildNodeMapsFromSnapshot, canonicalizeComponentValue, clearPrefabCache, collectDiffPaths, collectEntitySubtree, collectSnapshotSubtreeIds, computeInstanceOverrides, createHandMaterial, decanonicalizeComponentValue, despawnPrefab, encodeOverride, findSnapshotRootEntityIds, findTopLevelNestedRegions, groupOverridePaths, hydrateWorldFromSnapshot, hydrateWorldFromSnapshotDetailed, indexSnapshotByEntity, instantiateSubtree, loadPrefab, mergeComponentValue, parseOverride, parsePrefabAsset, prefabFileVersionFor, readXrCapabilities, restoreComponentState, restorePostCreateComponents, sampleTeleportArc, setPrefabAssetUrlResolver, spawnPrefab } from './chunk-O6FJA4XW.js';
3
- import { registerDefaultFactories } from './chunk-FQTOC7HK.js';
4
- 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, createXRInteractableComponent, createXRInteractorComponent, createXRInteractorSideComponent, createXRRigComponent, registerDefaultComponentFactories, registerDefaultFactories } from './chunk-FQTOC7HK.js';
5
- import { ObjectManagementSystem } from './chunk-JRJ3CL5H.js';
6
- export { ObjectManagementSystem, SHARED_MODEL_RESOURCE_FLAG, clearModelCache, loadSharedGltf, resolveDracoDecoderPath, setDracoDecoderPath } from './chunk-JRJ3CL5H.js';
7
- import { SelectionTransformState, Object3DRef, Name, EntityType, ParentId, Environment, Postprocessing, ScriptComponent } from './chunk-N4GKZ7IV.js';
8
- export { AnimationStateMachine, AnimationStateManager, components_exports as CoreComponents } from './chunk-N4GKZ7IV.js';
1
+ import { MeshGeometrySystem, InstancedMeshSystem, EnvironmentSyncSystem, PostprocessingSyncSystem, LightSyncSystem, MaterialSyncSystem, VRTeleportAreaSystem, PhysicsSyncSystem, AnimationSystem, AudioSystem, VideoSystem, CameraSyncSystem, TransformSyncSystem, ObjectVisibilitySystem, RenderSystem, spawnPrefab, despawnPrefab, buildNodeKeyMapsFromSnapshot, indexSnapshotByEntity, findTopLevelNestedRegions, collectSnapshotSubtreeIds, groupOverridePaths, OVERRIDE_DIFF_EXCLUDED_COMPONENTS, OVERRIDE_ROOT_EXCLUDED_COMPONENTS, canonicalizeComponentValue, mergeComponentValue, decanonicalizeComponentValue, computeInstanceOverrides, collectEntitySubtree, ADDED_NODE_MARKER_COMPONENT } from './chunk-W5TSYV6Q.js';
2
+ export { ADDED_NODE_MARKER_COMPONENT, ARC_GRAVITY, ARC_MAX_TIME, ARC_SPEED, ARC_STEPS, AnimationSystem, AudioSystem, Behaviour, CURLED_COS, CameraSyncSystem, DEFAULT_ENTER_CONFIDENCE, DEFAULT_EXIT_CONFIDENCE, DEFAULT_LOST_GRACE_SECONDS, DEFAULT_MIN_HOLD_SECONDS, EnvironmentSyncSystem, FALLBACK_HAND_SCALE, HYDRATABLE_ENTITY_KINDS, HandPoseTracker, InputSystem, InstancedMeshSystem, KeyboardKeys, LightSyncSystem, MATCH_FALLOFF, MAX_PLAUSIBLE_SPEED, MAX_SAMPLE_AGE_SECONDS, MaterialSyncSystem, MeshGeometrySystem, NODE_KEY_SEPARATOR, NO_XR_CAPABILITIES, OVERRIDE_DIFF_EXCLUDED_COMPONENTS, OVERRIDE_ROOT_EXCLUDED_COMPONENTS, ObjectVisibilitySystem, PINCH_FINGERS, PREFAB_FILE_VERSION, PREFAB_FILE_VERSION_NESTED, PhysicsSyncSystem, PostprocessingSyncSystem, RenderSystem, SCRIPT_OBJECT_ROOT_FLAG, STRAIGHT_COS, ScriptBehaviourSystem, ScriptObject, ScriptObjectSystem, ThrowVelocityTracker, TransformSyncSystem, VELOCITY_SAMPLES, VRTeleportAreaSystem, VideoSystem, XRControllerVisualSystem, XRHandPoseSystem, XRInputSystem, XRInteractionSystem, XRLocomotionSystem, XRSessionSystem, XRTeleportVisualSystem, XR_FINGERS, angularVelocityFrom, applyHandMaterial, arcGroundCrossing, buildComponentValueMaps, buildNodeKeyMapsFromSnapshot, buildNodeMapsFromSnapshot, canonicalizeComponentValue, clearPrefabCache, collectDiffPaths, collectEntitySubtree, collectSnapshotSubtreeIds, computeFingerCurl, computeHandShape, computeInstanceOverrides, computePalmPose, computePalmWidth, computePinch, computeSpread, createHandMaterial, decanonicalizeComponentValue, despawnPrefab, encodeOverride, estimateHandScale, findSnapshotRootEntityIds, findTopLevelNestedRegions, groupOverridePaths, hydrateWorldFromSnapshot, hydrateWorldFromSnapshotDetailed, indexSnapshotByEntity, instantiateSubtree, loadPrefab, matchHandPose, mergeComponentValue, parseOverride, parsePrefabAsset, prefabFileVersionFor, readXrCapabilities, restoreComponentState, restorePostCreateComponents, sampleTeleportArc, setPrefabAssetUrlResolver, spawnPrefab } from './chunk-W5TSYV6Q.js';
3
+ import { registerDefaultFactories } from './chunk-KIKIWCEB.js';
4
+ 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-KIKIWCEB.js';
5
+ import { ObjectManagementSystem } from './chunk-L5BP727H.js';
6
+ export { ObjectManagementSystem, SHARED_MODEL_RESOURCE_FLAG, clearModelCache, loadSharedGltf, resolveDracoDecoderPath, setDracoDecoderPath } from './chunk-L5BP727H.js';
7
+ import { SelectionTransformState, Object3DRef, Name, EntityType, ParentId, Environment, Postprocessing, ScriptComponent } from './chunk-KVGGAL5V.js';
8
+ export { AnimationStateMachine, AnimationStateManager, components_exports as CoreComponents, HAND_POSE_PRESETS, HAND_POSE_PRESET_IDS, cloneHandPose, getHandPosePreset, handPoseFromCurls } from './chunk-KVGGAL5V.js';
9
9
  import './chunk-QHILSPT4.js';
10
10
  import { normalizeDebugValue, DEBUG_CHANGE_IGNORED_SYSTEMS, cloneHistoryValue } from './chunk-OWQSESTO.js';
11
11
  import { __name } from './chunk-OY7ZODZP.js';