@relu-interactives/spatial-ecs 0.3.18 → 0.3.19

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 (40) hide show
  1. package/dist/{XRHandPose-B8xxFb9A.d.cts → XRHandPose-CLl4MiHx.d.cts} +12 -2
  2. package/dist/{XRHandPose-ubMe5Igc.d.ts → XRHandPose-CrzI57JA.d.ts} +12 -2
  3. package/dist/{chunk-PFE2SDXR.js → chunk-D6KXWNYT.js} +3 -3
  4. package/dist/{chunk-PFE2SDXR.js.map → chunk-D6KXWNYT.js.map} +1 -1
  5. package/dist/{chunk-J3EUNW57.js → chunk-H6DQ7JRE.js} +48 -18
  6. package/dist/chunk-H6DQ7JRE.js.map +1 -0
  7. package/dist/{chunk-7SSOZWXM.js → chunk-JYKFLQB5.js} +46 -5
  8. package/dist/chunk-JYKFLQB5.js.map +1 -0
  9. package/dist/{chunk-KRWBNC6Y.js → chunk-P42OE3RU.js} +4 -4
  10. package/dist/{chunk-KRWBNC6Y.js.map → chunk-P42OE3RU.js.map} +1 -1
  11. package/dist/components/index.cjs +33 -10
  12. package/dist/components/index.cjs.map +1 -1
  13. package/dist/components/index.d.cts +3 -3
  14. package/dist/components/index.d.ts +3 -3
  15. package/dist/components/index.js +1 -1
  16. package/dist/docs/guide/vr-and-hand-poses.md +67 -0
  17. package/dist/factories/index.cjs +8 -0
  18. package/dist/factories/index.cjs.map +1 -1
  19. package/dist/factories/index.d.cts +2 -2
  20. package/dist/factories/index.d.ts +2 -2
  21. package/dist/factories/index.js +3 -3
  22. package/dist/{handPose-dFxqbFFY.d.cts → handPose-DlcTtqgx.d.cts} +26 -1
  23. package/dist/{handPose-dFxqbFFY.d.ts → handPose-DlcTtqgx.d.ts} +26 -1
  24. package/dist/{index-7CFf45fo.d.cts → index-3pNbH0iP.d.cts} +1 -1
  25. package/dist/{index-D7aSZ-e9.d.ts → index-C_589fc4.d.ts} +1 -1
  26. package/dist/{index-DhWfxUgL.d.ts → index-JRcoel9F.d.ts} +3 -2
  27. package/dist/{index-CA9fqh4Z.d.cts → index-g777AmFv.d.cts} +3 -2
  28. package/dist/index.cjs +87 -15
  29. package/dist/index.cjs.map +1 -1
  30. package/dist/index.d.cts +11 -8
  31. package/dist/index.d.ts +11 -8
  32. package/dist/index.js +8 -8
  33. package/dist/systems/index.cjs +78 -15
  34. package/dist/systems/index.cjs.map +1 -1
  35. package/dist/systems/index.d.cts +2 -2
  36. package/dist/systems/index.d.ts +2 -2
  37. package/dist/systems/index.js +3 -3
  38. package/package.json +1 -1
  39. package/dist/chunk-7SSOZWXM.js.map +0 -1
  40. package/dist/chunk-J3EUNW57.js.map +0 -1
@@ -1,8 +1,8 @@
1
- import { A as AnimationComponent, b as AudioComponent, c as CameraComponentOptions, C as CameraComponent, T as RigidbodyState, g as ColliderState, P as PhysicsComponent, o as EntityType, I as ImageComponent, q as ImageTargetAnchor, p as ImageTarget, L as LightComponent, M as MaterialComponent, B as MeshComponent, F as MeshGeometryComponent, J as ModelComponent, N as Name, O as Object3DRef, W as ScriptEntry, V as ScriptComponent, Y as ScriptObjectComponentInput, X as ScriptObjectComponent, _ as Selectable, $ as SelectionTransformState, a0 as SpriteComponent, w as InstancedMeshKind, G as MeshGeometryParameters, v as InstancedMeshComponent, t as InstanceSlotComponent, a6 as VideoComponent, af as XRRigComponent, a4 as VRTeleportAreaComponent, a8 as XRHandPoseComponent, aa as XRInteractableComponent, ac as XRInteractorComponent, ae as XRInteractorSideComponent } from '../XRHandPose-B8xxFb9A.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, ag as XRRigComponent, a5 as VRTeleportAreaComponent, a9 as XRHandPoseComponent, ab as XRInteractableComponent, ad as XRInteractorComponent, af as XRInteractorSideComponent } from '../XRHandPose-CLl4MiHx.cjs';
2
2
  import { l as World, g as EnvironmentState, E as Environment, P as ParentId, i as PostprocessingState, h as Postprocessing, T as TransformComponent, O as ObjectManagementSystem } from '../System-BhnLw0fZ.cjs';
3
3
  import * as THREE from 'three';
4
4
  import '@dimforge/rapier3d-compat';
5
- import '../handPose-dFxqbFFY.cjs';
5
+ import '../handPose-DlcTtqgx.cjs';
6
6
 
7
7
  declare function createAnimationComponent(world: World, entityId: number, ...args: ConstructorParameters<typeof AnimationComponent>): AnimationComponent;
8
8
 
@@ -1,8 +1,8 @@
1
- import { A as AnimationComponent, b as AudioComponent, c as CameraComponentOptions, C as CameraComponent, T as RigidbodyState, g as ColliderState, P as PhysicsComponent, o as EntityType, I as ImageComponent, q as ImageTargetAnchor, p as ImageTarget, L as LightComponent, M as MaterialComponent, B as MeshComponent, F as MeshGeometryComponent, J as ModelComponent, N as Name, O as Object3DRef, W as ScriptEntry, V as ScriptComponent, Y as ScriptObjectComponentInput, X as ScriptObjectComponent, _ as Selectable, $ as SelectionTransformState, a0 as SpriteComponent, w as InstancedMeshKind, G as MeshGeometryParameters, v as InstancedMeshComponent, t as InstanceSlotComponent, a6 as VideoComponent, af as XRRigComponent, a4 as VRTeleportAreaComponent, a8 as XRHandPoseComponent, aa as XRInteractableComponent, ac as XRInteractorComponent, ae as XRInteractorSideComponent } from '../XRHandPose-ubMe5Igc.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, ag as XRRigComponent, a5 as VRTeleportAreaComponent, a9 as XRHandPoseComponent, ab as XRInteractableComponent, ad as XRInteractorComponent, af as XRInteractorSideComponent } from '../XRHandPose-CrzI57JA.js';
2
2
  import { l as World, g as EnvironmentState, E as Environment, P as ParentId, i as PostprocessingState, h as Postprocessing, T as TransformComponent, O as ObjectManagementSystem } from '../System-BhnLw0fZ.js';
3
3
  import * as THREE from 'three';
4
4
  import '@dimforge/rapier3d-compat';
5
- import '../handPose-dFxqbFFY.js';
5
+ import '../handPose-DlcTtqgx.js';
6
6
 
7
7
  declare function createAnimationComponent(world: World, entityId: number, ...args: ConstructorParameters<typeof AnimationComponent>): AnimationComponent;
8
8
 
@@ -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-KRWBNC6Y.js';
2
- import '../chunk-PFE2SDXR.js';
3
- import '../chunk-J3EUNW57.js';
1
+ export { createAnimationComponent, createAudioComponent, createCameraComponent, createEntityTypeComponent, createEnvironmentComponent, createImageComponent, createImageTargetAnchorComponent, createImageTargetComponent, createInstanceSlotComponent, createInstancedMeshComponent, createLightComponent, createMaterialComponent, createMeshComponent, createMeshGeometryComponent, createModelComponent, createNameComponent, createObject3DRefComponent, createParentIdComponent, createPhysicsComponent, createPostprocessingComponent, createScriptComponent, createScriptObjectComponent, createSelectableComponent, createSelectionTransformStateComponent, createSpriteComponent, createTransformComponent, createVRTeleportAreaComponent, createVideoComponent, createXRHandPoseComponent, createXRInteractableComponent, createXRInteractorComponent, createXRInteractorSideComponent, createXRRigComponent, registerDefaultComponentFactories, registerDefaultFactories } from '../chunk-P42OE3RU.js';
2
+ import '../chunk-D6KXWNYT.js';
3
+ import '../chunk-H6DQ7JRE.js';
4
4
  import '../chunk-OY7ZODZP.js';
5
5
  //# sourceMappingURL=index.js.map
6
6
  //# sourceMappingURL=index.js.map
@@ -119,6 +119,14 @@ type XrHandShape = {
119
119
  scale: number;
120
120
  /** Direction the thumb points, world space. */
121
121
  thumbDirection: THREE.Vector3 | null;
122
+ /**
123
+ * Direction each finger points, world space (metacarpal → tip).
124
+ *
125
+ * Separate from curl: a finger can be straight while pointing anywhere, and
126
+ * "index extended, pointing up" is a different pose from "index extended,
127
+ * pointing at the user".
128
+ */
129
+ fingerDirections: Record<XrFinger, THREE.Vector3 | null>;
122
130
  };
123
131
  /**
124
132
  * Reduce tracked joints to the matchable shape.
@@ -137,6 +145,14 @@ type XrFingerTarget = {
137
145
  baseCurl?: number;
138
146
  /** Optional outer-joint constraint. */
139
147
  tipCurl?: number;
148
+ /**
149
+ * Directions this finger may point, world space.
150
+ *
151
+ * Any ONE of them satisfies the constraint, mirroring fingerpose's
152
+ * `addDirection` — a thumb that may point up OR diagonally up is one pose,
153
+ * not two. Empty or omitted leaves the finger free to point anywhere.
154
+ */
155
+ directions?: XrHandPoseDirection[];
140
156
  };
141
157
  /** Which way something on the hand must point for the pose to count. */
142
158
  type XrHandPoseAxis = "palm-normal" | "fingers" | "thumb";
@@ -167,6 +183,13 @@ type XrHandPoseDefinition = {
167
183
  tolerance: number;
168
184
  };
169
185
  orientation?: XrHandPoseOrientation;
186
+ /**
187
+ * How far a finger may point from an accepted direction, in degrees.
188
+ *
189
+ * Generous by default: finger direction is a coarse signal, and a tight cone
190
+ * makes a pose that reads correctly to the user fail to register.
191
+ */
192
+ directionToleranceDegrees?: number;
170
193
  /** Restrict to one hand; omit to match either. */
171
194
  hand?: "left" | "right";
172
195
  };
@@ -180,6 +203,8 @@ type XrHandPoseMatch = {
180
203
  /** The constraint furthest out of range — what to show the user when it fails. */
181
204
  worstConstraint: string | null;
182
205
  };
206
+ /** Default cone for per-finger direction constraints. */
207
+ declare const DEFAULT_DIRECTION_TOLERANCE = 45;
183
208
  /** Extra world context needed only by head-relative orientation conditions. */
184
209
  type XrHandPoseContext = {
185
210
  headPosition?: THREE.Vector3;
@@ -237,4 +262,4 @@ declare class HandPoseTracker {
237
262
  reset(): void;
238
263
  }
239
264
 
240
- export { CURLED_COS as C, DEFAULT_ENTER_CONFIDENCE as D, FALLBACK_HAND_SCALE as F, HandPoseTracker as H, MATCH_FALLOFF as M, PINCH_FINGERS as P, STRAIGHT_COS as S, type XrHandPoseDefinition as X, type XrFinger as a, type XrHandPoseOrientation as b, DEFAULT_EXIT_CONFIDENCE as c, DEFAULT_LOST_GRACE_SECONDS as d, DEFAULT_MIN_HOLD_SECONDS as e, type HandPoseTrackerOptions as f, XR_FINGERS as g, type XrFingerCurl as h, type XrFingerTarget as i, type XrHandJointName as j, type XrHandJoints as k, type XrHandPoseAxis as l, type XrHandPoseContext as m, type XrHandPoseDirection as n, type XrHandPoseEvent as o, type XrHandPoseMatch as p, type XrHandShape as q, type XrPalmPose as r, computeFingerCurl as s, computeHandShape as t, computePalmPose as u, computePalmWidth as v, computePinch as w, computeSpread as x, estimateHandScale as y, matchHandPose as z };
265
+ export { matchHandPose as A, CURLED_COS as C, DEFAULT_DIRECTION_TOLERANCE as D, FALLBACK_HAND_SCALE as F, HandPoseTracker as H, MATCH_FALLOFF as M, PINCH_FINGERS as P, STRAIGHT_COS as S, type XrHandPoseDefinition as X, type XrFinger as a, type XrHandPoseOrientation as b, type XrHandPoseDirection as c, DEFAULT_ENTER_CONFIDENCE as d, DEFAULT_EXIT_CONFIDENCE as e, DEFAULT_LOST_GRACE_SECONDS as f, DEFAULT_MIN_HOLD_SECONDS as g, type HandPoseTrackerOptions as h, XR_FINGERS as i, type XrFingerCurl as j, type XrFingerTarget as k, type XrHandJointName as l, type XrHandJoints as m, type XrHandPoseAxis as n, type XrHandPoseContext as o, type XrHandPoseEvent as p, type XrHandPoseMatch as q, type XrHandShape as r, type XrPalmPose as s, computeFingerCurl as t, computeHandShape as u, computePalmPose as v, computePalmWidth as w, computePinch as x, computeSpread as y, estimateHandScale as z };
@@ -119,6 +119,14 @@ type XrHandShape = {
119
119
  scale: number;
120
120
  /** Direction the thumb points, world space. */
121
121
  thumbDirection: THREE.Vector3 | null;
122
+ /**
123
+ * Direction each finger points, world space (metacarpal → tip).
124
+ *
125
+ * Separate from curl: a finger can be straight while pointing anywhere, and
126
+ * "index extended, pointing up" is a different pose from "index extended,
127
+ * pointing at the user".
128
+ */
129
+ fingerDirections: Record<XrFinger, THREE.Vector3 | null>;
122
130
  };
123
131
  /**
124
132
  * Reduce tracked joints to the matchable shape.
@@ -137,6 +145,14 @@ type XrFingerTarget = {
137
145
  baseCurl?: number;
138
146
  /** Optional outer-joint constraint. */
139
147
  tipCurl?: number;
148
+ /**
149
+ * Directions this finger may point, world space.
150
+ *
151
+ * Any ONE of them satisfies the constraint, mirroring fingerpose's
152
+ * `addDirection` — a thumb that may point up OR diagonally up is one pose,
153
+ * not two. Empty or omitted leaves the finger free to point anywhere.
154
+ */
155
+ directions?: XrHandPoseDirection[];
140
156
  };
141
157
  /** Which way something on the hand must point for the pose to count. */
142
158
  type XrHandPoseAxis = "palm-normal" | "fingers" | "thumb";
@@ -167,6 +183,13 @@ type XrHandPoseDefinition = {
167
183
  tolerance: number;
168
184
  };
169
185
  orientation?: XrHandPoseOrientation;
186
+ /**
187
+ * How far a finger may point from an accepted direction, in degrees.
188
+ *
189
+ * Generous by default: finger direction is a coarse signal, and a tight cone
190
+ * makes a pose that reads correctly to the user fail to register.
191
+ */
192
+ directionToleranceDegrees?: number;
170
193
  /** Restrict to one hand; omit to match either. */
171
194
  hand?: "left" | "right";
172
195
  };
@@ -180,6 +203,8 @@ type XrHandPoseMatch = {
180
203
  /** The constraint furthest out of range — what to show the user when it fails. */
181
204
  worstConstraint: string | null;
182
205
  };
206
+ /** Default cone for per-finger direction constraints. */
207
+ declare const DEFAULT_DIRECTION_TOLERANCE = 45;
183
208
  /** Extra world context needed only by head-relative orientation conditions. */
184
209
  type XrHandPoseContext = {
185
210
  headPosition?: THREE.Vector3;
@@ -237,4 +262,4 @@ declare class HandPoseTracker {
237
262
  reset(): void;
238
263
  }
239
264
 
240
- export { CURLED_COS as C, DEFAULT_ENTER_CONFIDENCE as D, FALLBACK_HAND_SCALE as F, HandPoseTracker as H, MATCH_FALLOFF as M, PINCH_FINGERS as P, STRAIGHT_COS as S, type XrHandPoseDefinition as X, type XrFinger as a, type XrHandPoseOrientation as b, DEFAULT_EXIT_CONFIDENCE as c, DEFAULT_LOST_GRACE_SECONDS as d, DEFAULT_MIN_HOLD_SECONDS as e, type HandPoseTrackerOptions as f, XR_FINGERS as g, type XrFingerCurl as h, type XrFingerTarget as i, type XrHandJointName as j, type XrHandJoints as k, type XrHandPoseAxis as l, type XrHandPoseContext as m, type XrHandPoseDirection as n, type XrHandPoseEvent as o, type XrHandPoseMatch as p, type XrHandShape as q, type XrPalmPose as r, computeFingerCurl as s, computeHandShape as t, computePalmPose as u, computePalmWidth as v, computePinch as w, computeSpread as x, estimateHandScale as y, matchHandPose as z };
265
+ export { matchHandPose as A, CURLED_COS as C, DEFAULT_DIRECTION_TOLERANCE as D, FALLBACK_HAND_SCALE as F, HandPoseTracker as H, MATCH_FALLOFF as M, PINCH_FINGERS as P, STRAIGHT_COS as S, type XrHandPoseDefinition as X, type XrFinger as a, type XrHandPoseOrientation as b, type XrHandPoseDirection as c, DEFAULT_ENTER_CONFIDENCE as d, DEFAULT_EXIT_CONFIDENCE as e, DEFAULT_LOST_GRACE_SECONDS as f, DEFAULT_MIN_HOLD_SECONDS as g, type HandPoseTrackerOptions as h, XR_FINGERS as i, type XrFingerCurl as j, type XrFingerTarget as k, type XrHandJointName as l, type XrHandJoints as m, type XrHandPoseAxis as n, type XrHandPoseContext as o, type XrHandPoseEvent as p, type XrHandPoseMatch as q, type XrHandShape as r, type XrPalmPose as s, computeFingerCurl as t, computeHandShape as u, computePalmPose as v, computePalmWidth as w, computePinch as x, computeSpread as y, estimateHandScale as z };
@@ -1,6 +1,6 @@
1
1
  import { k as EcsSystem, l as World } from './System-BhnLw0fZ.cjs';
2
2
  import * as THREE from 'three';
3
- import { k as XrHandJoints, q as XrHandShape } from './handPose-dFxqbFFY.cjs';
3
+ import { m as XrHandJoints, r as XrHandShape } from './handPose-DlcTtqgx.cjs';
4
4
 
5
5
  declare class AnimationSystem implements EcsSystem {
6
6
  private readonly runtimeByEntity;
@@ -1,6 +1,6 @@
1
1
  import { k as EcsSystem, l as World } from './System-BhnLw0fZ.js';
2
2
  import * as THREE from 'three';
3
- import { k as XrHandJoints, q as XrHandShape } from './handPose-dFxqbFFY.js';
3
+ import { m as XrHandJoints, r as XrHandShape } from './handPose-DlcTtqgx.js';
4
4
 
5
5
  declare class AnimationSystem implements EcsSystem {
6
6
  private readonly runtimeByEntity;
@@ -1,4 +1,4 @@
1
- import { A as AnimationComponent, a as AnimationComponentOptions, b as AudioComponent, C as CameraComponent, c as CameraComponentOptions, d as CameraProjection, e as CameraRuntimeType, f as ColliderShape, g as ColliderState, h as CubeMeshParameters, D as DEFAULT_COLLIDER_STATE, i as DEFAULT_INSTANCED_MESH_PARAMETERS, j as DEFAULT_INSTANCE_TRANSFORM, k as DEFAULT_MESH_GEOMETRY_PARAMETERS, l as DEFAULT_PHYSICS_STATE, m as DEFAULT_POSE_CURLS, n as DEFAULT_RIGIDBODY_STATE, E as EditableMeshObjectKind, o as EntityType, I as ImageComponent, p as ImageTarget, q as ImageTargetAnchor, r as ImageTargetAnchorOptions, s as ImageTargetReference, t as InstanceSlotComponent, u as InstanceTransform, v as InstancedMeshComponent, w as InstancedMeshKind, L as LightComponent, x as LightValueState, M as MaterialComponent, y as MaterialTypeValue, z as MaterialValueState, B as MeshComponent, F as MeshGeometryComponent, G as MeshGeometryParameters, H as MeshGeometryParametersByKind, J as ModelComponent, N as Name, O as Object3DRef, P as PhysicsComponent, K as PhysicsState, Q as PlaneMeshParameters, R as RadiusHeightMeshParameters, S as RadiusMeshParameters, T as RigidbodyState, U as RigidbodyType, V as ScriptComponent, W as ScriptEntry, X as ScriptObjectComponent, Y as ScriptObjectComponentInput, Z as ScriptObjectRuntimeState, _ as Selectable, $ as SelectionTransformState, a0 as SpriteComponent, a1 as TextureFilteringValue, a2 as TransformModeValue, a3 as TransformSpaceValue, a4 as VRTeleportAreaComponent, a5 as VRTeleportAreaOptions, a6 as VideoComponent, a7 as VrTeleportShape, a8 as XRHandPoseComponent, a9 as XRHandPoseOptions, aa as XRInteractableComponent, ab as XRInteractableOptions, ac as XRInteractorComponent, ad as XRInteractorOptions, ae as XRInteractorSideComponent, af as XRRigComponent, ag as XRRigOptions, ah as XrAttachPoint, ai as XrDistanceGrabBehavior, aj as XrGrabGesture, ak as XrGrabHands, al as XrGrabReach, am as XrHandPoseEntry, an as XrHandPreset, ao as XrInteractorSide, ap as XrInteractorType, aq as XrLocomotionMode, ar as XrTrackingOrigin, as as XrTwoHandRotation, at as createAttachPoint, au as createHandPoseEntry, av as defaultMaterialValue, aw as handPoseDefinitionFor, ax as normalizePhysicsState, ay as setPhysicsLiveRef } from './XRHandPose-ubMe5Igc.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 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
2
  import { C as Component, D as DEFAULT_ENVIRONMENT_STATE, a as DEFAULT_POSTPROCESSING_STATE, E as Environment, b as EnvironmentFogState, c as EnvironmentFogType, d as EnvironmentGradientEffect, e as EnvironmentSkyboxState, f as EnvironmentSkyboxType, g as EnvironmentState, P as ParentId, h as Postprocessing, i as PostprocessingState, T as TransformComponent, j as TransformData, V as Vec3 } from './System-BhnLw0fZ.js';
3
3
 
4
4
  /**
@@ -85,6 +85,7 @@ declare const index_DEFAULT_INSTANCE_TRANSFORM: typeof DEFAULT_INSTANCE_TRANSFOR
85
85
  declare const index_DEFAULT_MESH_GEOMETRY_PARAMETERS: typeof DEFAULT_MESH_GEOMETRY_PARAMETERS;
86
86
  declare const index_DEFAULT_PHYSICS_STATE: typeof DEFAULT_PHYSICS_STATE;
87
87
  declare const index_DEFAULT_POSE_CURLS: typeof DEFAULT_POSE_CURLS;
88
+ declare const index_DEFAULT_POSE_DIRECTIONS: typeof DEFAULT_POSE_DIRECTIONS;
88
89
  declare const index_DEFAULT_POSTPROCESSING_STATE: typeof DEFAULT_POSTPROCESSING_STATE;
89
90
  declare const index_DEFAULT_RIGIDBODY_STATE: typeof DEFAULT_RIGIDBODY_STATE;
90
91
  declare const index_EditableMeshObjectKind: typeof EditableMeshObjectKind;
@@ -177,7 +178,7 @@ declare const index_handPoseDefinitionFor: typeof handPoseDefinitionFor;
177
178
  declare const index_normalizePhysicsState: typeof normalizePhysicsState;
178
179
  declare const index_setPhysicsLiveRef: typeof setPhysicsLiveRef;
179
180
  declare namespace index {
180
- 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_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 };
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 };
181
182
  }
182
183
 
183
184
  export { PrefabInstance as P, PrefabNode as a, index as i };
@@ -1,4 +1,4 @@
1
- import { A as AnimationComponent, a as AnimationComponentOptions, b as AudioComponent, C as CameraComponent, c as CameraComponentOptions, d as CameraProjection, e as CameraRuntimeType, f as ColliderShape, g as ColliderState, h as CubeMeshParameters, D as DEFAULT_COLLIDER_STATE, i as DEFAULT_INSTANCED_MESH_PARAMETERS, j as DEFAULT_INSTANCE_TRANSFORM, k as DEFAULT_MESH_GEOMETRY_PARAMETERS, l as DEFAULT_PHYSICS_STATE, m as DEFAULT_POSE_CURLS, n as DEFAULT_RIGIDBODY_STATE, E as EditableMeshObjectKind, o as EntityType, I as ImageComponent, p as ImageTarget, q as ImageTargetAnchor, r as ImageTargetAnchorOptions, s as ImageTargetReference, t as InstanceSlotComponent, u as InstanceTransform, v as InstancedMeshComponent, w as InstancedMeshKind, L as LightComponent, x as LightValueState, M as MaterialComponent, y as MaterialTypeValue, z as MaterialValueState, B as MeshComponent, F as MeshGeometryComponent, G as MeshGeometryParameters, H as MeshGeometryParametersByKind, J as ModelComponent, N as Name, O as Object3DRef, P as PhysicsComponent, K as PhysicsState, Q as PlaneMeshParameters, R as RadiusHeightMeshParameters, S as RadiusMeshParameters, T as RigidbodyState, U as RigidbodyType, V as ScriptComponent, W as ScriptEntry, X as ScriptObjectComponent, Y as ScriptObjectComponentInput, Z as ScriptObjectRuntimeState, _ as Selectable, $ as SelectionTransformState, a0 as SpriteComponent, a1 as TextureFilteringValue, a2 as TransformModeValue, a3 as TransformSpaceValue, a4 as VRTeleportAreaComponent, a5 as VRTeleportAreaOptions, a6 as VideoComponent, a7 as VrTeleportShape, a8 as XRHandPoseComponent, a9 as XRHandPoseOptions, aa as XRInteractableComponent, ab as XRInteractableOptions, ac as XRInteractorComponent, ad as XRInteractorOptions, ae as XRInteractorSideComponent, af as XRRigComponent, ag as XRRigOptions, ah as XrAttachPoint, ai as XrDistanceGrabBehavior, aj as XrGrabGesture, ak as XrGrabHands, al as XrGrabReach, am as XrHandPoseEntry, an as XrHandPreset, ao as XrInteractorSide, ap as XrInteractorType, aq as XrLocomotionMode, ar as XrTrackingOrigin, as as XrTwoHandRotation, at as createAttachPoint, au as createHandPoseEntry, av as defaultMaterialValue, aw as handPoseDefinitionFor, ax as normalizePhysicsState, ay as setPhysicsLiveRef } from './XRHandPose-B8xxFb9A.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 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
2
  import { C as Component, D as DEFAULT_ENVIRONMENT_STATE, a as DEFAULT_POSTPROCESSING_STATE, E as Environment, b as EnvironmentFogState, c as EnvironmentFogType, d as EnvironmentGradientEffect, e as EnvironmentSkyboxState, f as EnvironmentSkyboxType, g as EnvironmentState, P as ParentId, h as Postprocessing, i as PostprocessingState, T as TransformComponent, j as TransformData, V as Vec3 } from './System-BhnLw0fZ.cjs';
3
3
 
4
4
  /**
@@ -85,6 +85,7 @@ declare const index_DEFAULT_INSTANCE_TRANSFORM: typeof DEFAULT_INSTANCE_TRANSFOR
85
85
  declare const index_DEFAULT_MESH_GEOMETRY_PARAMETERS: typeof DEFAULT_MESH_GEOMETRY_PARAMETERS;
86
86
  declare const index_DEFAULT_PHYSICS_STATE: typeof DEFAULT_PHYSICS_STATE;
87
87
  declare const index_DEFAULT_POSE_CURLS: typeof DEFAULT_POSE_CURLS;
88
+ declare const index_DEFAULT_POSE_DIRECTIONS: typeof DEFAULT_POSE_DIRECTIONS;
88
89
  declare const index_DEFAULT_POSTPROCESSING_STATE: typeof DEFAULT_POSTPROCESSING_STATE;
89
90
  declare const index_DEFAULT_RIGIDBODY_STATE: typeof DEFAULT_RIGIDBODY_STATE;
90
91
  declare const index_EditableMeshObjectKind: typeof EditableMeshObjectKind;
@@ -177,7 +178,7 @@ declare const index_handPoseDefinitionFor: typeof handPoseDefinitionFor;
177
178
  declare const index_normalizePhysicsState: typeof normalizePhysicsState;
178
179
  declare const index_setPhysicsLiveRef: typeof setPhysicsLiveRef;
179
180
  declare namespace index {
180
- 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_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 };
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 };
181
182
  }
182
183
 
183
184
  export { PrefabInstance as P, PrefabNode as a, index as i };
package/dist/index.cjs CHANGED
@@ -2729,15 +2729,22 @@ function getHandPosePreset(id) {
2729
2729
  return cloneHandPose(preset);
2730
2730
  }
2731
2731
  __name(getHandPosePreset, "getHandPosePreset");
2732
+ function cloneTarget(target) {
2733
+ return {
2734
+ ...target,
2735
+ ...target.directions ? { directions: [...target.directions] } : {}
2736
+ };
2737
+ }
2738
+ __name(cloneTarget, "cloneTarget");
2732
2739
  function cloneHandPose(definition) {
2733
2740
  return {
2734
2741
  ...definition,
2735
2742
  fingers: {
2736
- thumb: { ...definition.fingers.thumb },
2737
- index: { ...definition.fingers.index },
2738
- middle: { ...definition.fingers.middle },
2739
- ring: { ...definition.fingers.ring },
2740
- pinky: { ...definition.fingers.pinky }
2743
+ thumb: cloneTarget(definition.fingers.thumb),
2744
+ index: cloneTarget(definition.fingers.index),
2745
+ middle: cloneTarget(definition.fingers.middle),
2746
+ ring: cloneTarget(definition.fingers.ring),
2747
+ pinky: cloneTarget(definition.fingers.pinky)
2741
2748
  },
2742
2749
  pinch: definition.pinch ? { ...definition.pinch } : void 0,
2743
2750
  orientation: definition.orientation ? { ...definition.orientation } : void 0
@@ -2746,22 +2753,27 @@ function cloneHandPose(definition) {
2746
2753
  __name(cloneHandPose, "cloneHandPose");
2747
2754
  function handPoseFromCurls(id, name, curls, options) {
2748
2755
  const tolerance = options?.tolerance ?? NARROW;
2749
- const target = /* @__PURE__ */ __name((curl) => ({
2750
- curl: Math.min(1, Math.max(0, curl)),
2751
- tolerance
2752
- }), "target");
2756
+ const target = /* @__PURE__ */ __name((finger, curl) => {
2757
+ const directions = options?.directions?.[finger];
2758
+ return {
2759
+ curl: Math.min(1, Math.max(0, curl)),
2760
+ tolerance,
2761
+ ...directions && directions.length > 0 ? { directions } : {}
2762
+ };
2763
+ }, "target");
2753
2764
  return {
2754
2765
  id,
2755
2766
  name,
2756
2767
  fingers: {
2757
- thumb: target(curls.thumb),
2758
- index: target(curls.index),
2759
- middle: target(curls.middle),
2760
- ring: target(curls.ring),
2761
- pinky: target(curls.pinky)
2768
+ thumb: target("thumb", curls.thumb),
2769
+ index: target("index", curls.index),
2770
+ middle: target("middle", curls.middle),
2771
+ ring: target("ring", curls.ring),
2772
+ pinky: target("pinky", curls.pinky)
2762
2773
  },
2763
2774
  pinch: options?.pinch,
2764
2775
  orientation: options?.orientation,
2776
+ directionToleranceDegrees: options?.directionToleranceDegrees,
2765
2777
  hand: options?.hand
2766
2778
  };
2767
2779
  }
@@ -2775,6 +2787,13 @@ var DEFAULT_POSE_CURLS = {
2775
2787
  ring: 0,
2776
2788
  pinky: 0
2777
2789
  };
2790
+ var DEFAULT_POSE_DIRECTIONS = {
2791
+ thumb: [],
2792
+ index: [],
2793
+ middle: [],
2794
+ ring: [],
2795
+ pinky: []
2796
+ };
2778
2797
  function createHandPoseEntry(partial) {
2779
2798
  return {
2780
2799
  id: partial.id,
@@ -2782,6 +2801,14 @@ function createHandPoseEntry(partial) {
2782
2801
  preset: partial.preset ?? null,
2783
2802
  curls: { ...DEFAULT_POSE_CURLS, ...partial.curls },
2784
2803
  tolerance: partial.tolerance ?? 0.25,
2804
+ directions: {
2805
+ thumb: [...partial.directions?.thumb ?? []],
2806
+ index: [...partial.directions?.index ?? []],
2807
+ middle: [...partial.directions?.middle ?? []],
2808
+ ring: [...partial.directions?.ring ?? []],
2809
+ pinky: [...partial.directions?.pinky ?? []]
2810
+ },
2811
+ directionTolerance: partial.directionTolerance ?? 45,
2785
2812
  hand: partial.hand ?? null,
2786
2813
  orientation: partial.orientation ?? null,
2787
2814
  minHoldSeconds: partial.minHoldSeconds ?? 0.15,
@@ -2804,7 +2831,9 @@ function handPoseDefinitionFor(entry, resolvePreset) {
2804
2831
  return handPoseFromCurls(entry.id, entry.name, entry.curls, {
2805
2832
  tolerance: entry.tolerance,
2806
2833
  orientation: entry.orientation ?? void 0,
2807
- hand: entry.hand ?? void 0
2834
+ hand: entry.hand ?? void 0,
2835
+ directions: entry.directions,
2836
+ directionToleranceDegrees: entry.directionTolerance
2808
2837
  });
2809
2838
  }
2810
2839
  __name(handPoseDefinitionFor, "handPoseDefinitionFor");
@@ -3960,6 +3989,7 @@ __export(components_exports, {
3960
3989
  DEFAULT_MESH_GEOMETRY_PARAMETERS: () => DEFAULT_MESH_GEOMETRY_PARAMETERS,
3961
3990
  DEFAULT_PHYSICS_STATE: () => DEFAULT_PHYSICS_STATE,
3962
3991
  DEFAULT_POSE_CURLS: () => DEFAULT_POSE_CURLS,
3992
+ DEFAULT_POSE_DIRECTIONS: () => DEFAULT_POSE_DIRECTIONS,
3963
3993
  DEFAULT_POSTPROCESSING_STATE: () => DEFAULT_POSTPROCESSING_STATE,
3964
3994
  DEFAULT_RIGIDBODY_STATE: () => DEFAULT_RIGIDBODY_STATE,
3965
3995
  EntityType: () => EntityType,
@@ -13032,10 +13062,22 @@ function computeHandShape(joints, handedness) {
13032
13062
  const direction = new THREE51__namespace.Vector3().subVectors(thumbTip, thumbBase);
13033
13063
  if (direction.lengthSq() > 1e-12) thumbDirection = direction.normalize();
13034
13064
  }
13065
+ const fingerDirections = {};
13066
+ for (const finger of XR_FINGERS) {
13067
+ const base = joints[METACARPAL_JOINTS[finger]];
13068
+ const tip = joints[TIP_JOINTS[finger]];
13069
+ if (!base || !tip) {
13070
+ fingerDirections[finger] = null;
13071
+ continue;
13072
+ }
13073
+ const direction = new THREE51__namespace.Vector3().subVectors(tip, base);
13074
+ fingerDirections[finger] = direction.lengthSq() > 1e-12 ? direction.normalize() : null;
13075
+ }
13035
13076
  return {
13036
13077
  handedness,
13037
13078
  fingers: fingers2,
13038
13079
  pinch,
13080
+ fingerDirections,
13039
13081
  spread: {
13040
13082
  thumbIndex: computeSpread(joints, "thumb", "index") ?? 0,
13041
13083
  indexMiddle: computeSpread(joints, "index", "middle") ?? 0,
@@ -13060,6 +13102,7 @@ function scoreAgainst(actual, target, tolerance) {
13060
13102
  return clamp01(1 - (error - tolerance) / MATCH_FALLOFF);
13061
13103
  }
13062
13104
  __name(scoreAgainst, "scoreAgainst");
13105
+ var DEFAULT_DIRECTION_TOLERANCE = 45;
13063
13106
  var WORLD_DIRECTIONS = {
13064
13107
  up: new THREE51__namespace.Vector3(0, 1, 0),
13065
13108
  down: new THREE51__namespace.Vector3(0, -1, 0),
@@ -13087,6 +13130,22 @@ function resolveDirection(direction, shape, context) {
13087
13130
  return direction === "toward-head" ? toHead : toHead.multiplyScalar(-1);
13088
13131
  }
13089
13132
  __name(resolveDirection, "resolveDirection");
13133
+ function scoreDirections(actual, accepted, shape, toleranceDegrees, context) {
13134
+ if (!actual) return 0;
13135
+ let best = 0;
13136
+ for (const direction of accepted) {
13137
+ const wanted = resolveDirection(direction, shape, context);
13138
+ if (!wanted) continue;
13139
+ const angle = THREE51__namespace.MathUtils.radToDeg(
13140
+ Math.acos(THREE51__namespace.MathUtils.clamp(actual.dot(wanted), -1, 1))
13141
+ );
13142
+ const normalizedError = Math.max(0, angle - toleranceDegrees) / 90;
13143
+ const score = clamp01(1 - normalizedError / MATCH_FALLOFF);
13144
+ if (score > best) best = score;
13145
+ }
13146
+ return best;
13147
+ }
13148
+ __name(scoreDirections, "scoreDirections");
13090
13149
  function matchHandPose(shape, definition, context) {
13091
13150
  if (definition.hand && definition.hand !== shape.handedness) return NO_MATCH;
13092
13151
  let confidence = 1;
@@ -13116,6 +13175,18 @@ function matchHandPose(shape, definition, context) {
13116
13175
  `${finger} tip`
13117
13176
  );
13118
13177
  }
13178
+ if (target.directions && target.directions.length > 0) {
13179
+ consider(
13180
+ scoreDirections(
13181
+ shape.fingerDirections[finger],
13182
+ target.directions,
13183
+ shape,
13184
+ definition.directionToleranceDegrees ?? DEFAULT_DIRECTION_TOLERANCE,
13185
+ context
13186
+ ),
13187
+ `${finger} direction`
13188
+ );
13189
+ }
13119
13190
  }
13120
13191
  if (definition.pinch) {
13121
13192
  const { finger, target, tolerance } = definition.pinch;
@@ -14864,6 +14935,7 @@ exports.CURLED_COS = CURLED_COS;
14864
14935
  exports.CameraSyncSystem = CameraSyncSystem;
14865
14936
  exports.Component = Component;
14866
14937
  exports.CoreComponents = components_exports;
14938
+ exports.DEFAULT_DIRECTION_TOLERANCE = DEFAULT_DIRECTION_TOLERANCE;
14867
14939
  exports.DEFAULT_ENTER_CONFIDENCE = DEFAULT_ENTER_CONFIDENCE;
14868
14940
  exports.DEFAULT_EXIT_CONFIDENCE = DEFAULT_EXIT_CONFIDENCE;
14869
14941
  exports.DEFAULT_LOST_GRACE_SECONDS = DEFAULT_LOST_GRACE_SECONDS;