@relu-interactives/spatial-ecs 0.3.9 → 0.3.11

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 (38) hide show
  1. package/dist/{XRHandPose-CxPz8VBp.d.ts → XRHandPose-B6I4y1lj.d.ts} +117 -14
  2. package/dist/{XRHandPose-VuSbe4iz.d.cts → XRHandPose-C-KJeYcJ.d.cts} +117 -14
  3. package/dist/{chunk-KIKIWCEB.js → chunk-FSHRPY65.js} +4 -4
  4. package/dist/{chunk-KIKIWCEB.js.map → chunk-FSHRPY65.js.map} +1 -1
  5. package/dist/{chunk-W5TSYV6Q.js → chunk-KLU2M43M.js} +836 -212
  6. package/dist/chunk-KLU2M43M.js.map +1 -0
  7. package/dist/{chunk-KVGGAL5V.js → chunk-TXEGYR76.js} +26 -5
  8. package/dist/chunk-TXEGYR76.js.map +1 -0
  9. package/dist/{chunk-L5BP727H.js → chunk-Y3AC3VZ2.js} +3 -3
  10. package/dist/{chunk-L5BP727H.js.map → chunk-Y3AC3VZ2.js.map} +1 -1
  11. package/dist/components/index.cjs +23 -2
  12. package/dist/components/index.cjs.map +1 -1
  13. package/dist/components/index.d.cts +2 -2
  14. package/dist/components/index.d.ts +2 -2
  15. package/dist/components/index.js +1 -1
  16. package/dist/docs/guide/vr-and-hand-poses.md +55 -3
  17. package/dist/factories/index.cjs +22 -2
  18. package/dist/factories/index.cjs.map +1 -1
  19. package/dist/factories/index.d.cts +1 -1
  20. package/dist/factories/index.d.ts +1 -1
  21. package/dist/factories/index.js +3 -3
  22. package/dist/{index-C7XQyrgE.d.ts → index-Bi_wIo1o.d.ts} +107 -1
  23. package/dist/{index-BxdXgqiI.d.ts → index-CEZp7qLL.d.ts} +9 -3
  24. package/dist/{index-BIQoaKAA.d.cts → index-DPRnnSI-.d.cts} +9 -3
  25. package/dist/{index-DyN50JZo.d.cts → index-jlgDou9W.d.cts} +107 -1
  26. package/dist/index.cjs +978 -331
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.d.cts +14 -5
  29. package/dist/index.d.ts +14 -5
  30. package/dist/index.js +8 -8
  31. package/dist/systems/index.cjs +885 -239
  32. package/dist/systems/index.cjs.map +1 -1
  33. package/dist/systems/index.d.cts +1 -1
  34. package/dist/systems/index.d.ts +1 -1
  35. package/dist/systems/index.js +3 -3
  36. package/package.json +1 -1
  37. package/dist/chunk-KVGGAL5V.js.map +0 -1
  38. package/dist/chunk-W5TSYV6Q.js.map +0 -1
@@ -610,10 +610,36 @@ declare function normalizePhysicsState(value: {
610
610
  * ENUMERABLE property from plain assignment, leaking Rapier objects — and for
611
611
  * trimesh their huge vertex buffers — into snapshot/history/debug walks.
612
612
  */
613
- declare function setPhysicsLiveRef(component: PhysicsComponent, key: "rigidBody" | "collider", value: RapierRigidBody | RapierCollider | null): void;
613
+ /**
614
+ * A velocity waiting to be applied to the body, in world space.
615
+ *
616
+ * Needed because a throw is decided while the body is still kinematic (the hand
617
+ * was holding it), and Rapier ignores velocity on kinematic bodies. Queueing it
618
+ * lets `PhysicsSyncSystem` apply it in the same tick it turns the body dynamic
619
+ * again, which is the only moment the velocity actually takes.
620
+ */
621
+ type PendingBodyVelocity = {
622
+ linear: {
623
+ x: number;
624
+ y: number;
625
+ z: number;
626
+ };
627
+ angular: {
628
+ x: number;
629
+ y: number;
630
+ z: number;
631
+ };
632
+ };
633
+ declare function setPhysicsLiveRef(component: PhysicsComponent, key: "rigidBody" | "collider" | "pendingVelocity", value: RapierRigidBody | RapierCollider | PendingBodyVelocity | null): void;
614
634
  declare class PhysicsComponent extends Component {
615
635
  /** Authoring state. Saved with the project. */
616
636
  values: PhysicsState;
637
+ /**
638
+ * Velocity to apply the moment this body becomes dynamic again.
639
+ *
640
+ * Non-enumerable, like the Rapier refs — never serialized.
641
+ */
642
+ pendingVelocity?: PendingBodyVelocity | null;
617
643
  /**
618
644
  * Live Rapier rigid body. `null` until physics is initialized.
619
645
  * NON-ENUMERABLE — Rapier wrappers (and, for trimesh, their vertex buffers)
@@ -1208,14 +1234,6 @@ declare class VRTeleportAreaComponent extends Component {
1208
1234
  constructor(options?: VRTeleportAreaOptions);
1209
1235
  }
1210
1236
 
1211
- /**
1212
- * How an entity behaves while held.
1213
- *
1214
- * `kinematic` snaps it to the hand and ignores physics — predictable, and right
1215
- * for tools and UI. `physics` keeps the body simulated so it can collide while
1216
- * held and, crucially, carry momentum when released (see {@link throwOnRelease}).
1217
- */
1218
- type XrGrabMode = "kinematic" | "physics";
1219
1237
  /**
1220
1238
  * How close the user must be to grab.
1221
1239
  *
@@ -1241,12 +1259,60 @@ type XrDistanceGrabBehavior = "snap" | "remote";
1241
1259
  * precise pickups with firm grabs — a chess piece versus a suitcase handle.
1242
1260
  */
1243
1261
  type XrGrabGesture = "any" | "pinch" | "full";
1262
+ /**
1263
+ * A hand-hold authored on the object.
1264
+ *
1265
+ * Without attach points a hand grabs wherever it happens to touch, which is
1266
+ * right for a ball and wrong for a rifle — a weapon has a grip and a foregrip,
1267
+ * and the hands belong on those exact spots. `role` is what lets an author say
1268
+ * "this is the trigger hand's hold" so a two-hand grab assembles correctly no
1269
+ * matter which hand arrives first.
1270
+ */
1271
+ type XrAttachPoint = {
1272
+ /** Stable id; referenced by scripts and by the inspector list. */
1273
+ id: string;
1274
+ name: string;
1275
+ /** Object-local position of the hold (unscaled). */
1276
+ position: {
1277
+ x: number;
1278
+ y: number;
1279
+ z: number;
1280
+ };
1281
+ /** Object-local orientation of the hold, radians. */
1282
+ rotation: {
1283
+ x: number;
1284
+ y: number;
1285
+ z: number;
1286
+ };
1287
+ /** Restrict to one hand, or `any`. */
1288
+ hand: "left" | "right" | "any";
1289
+ /** Whether this hold is the anchoring hand, the steering hand, or either. */
1290
+ role: "primary" | "secondary" | "any";
1291
+ };
1292
+ /**
1293
+ * How many hands may hold the object at once, and what a second grab does.
1294
+ *
1295
+ * `single` is a plain pickup. `handOff` lets the other hand TAKE it — the
1296
+ * everyday gesture of passing something between your hands. `two` keeps both
1297
+ * hands on it, which is what enables aiming a two-handed weapon and
1298
+ * pull-apart scaling.
1299
+ */
1300
+ type XrGrabHands = "single" | "handOff" | "two";
1301
+ /** How the second hand affects orientation. See `solveTwoHandTransform`. */
1302
+ type XrTwoHandRotation = "align" | "primary";
1303
+ /**
1304
+ * What an object does when a pointer lands on it.
1305
+ *
1306
+ * Hover feedback is what tells the user the ray has actually caught something —
1307
+ * without it, aiming at a grabbable object and aiming at empty space look
1308
+ * identical.
1309
+ */
1310
+ type XrHoverBehavior = "none" | "color" | "scale" | "both";
1244
1311
  /** Optional initializer for {@link XRInteractableComponent}. */
1245
1312
  type XRInteractableOptions = {
1246
1313
  enabled?: boolean;
1247
1314
  grabbable?: boolean;
1248
1315
  pointable?: boolean;
1249
- grabMode?: XrGrabMode;
1250
1316
  grabReach?: XrGrabReach;
1251
1317
  distanceBehavior?: XrDistanceGrabBehavior;
1252
1318
  grabGesture?: XrGrabGesture;
@@ -1264,11 +1330,28 @@ type XRInteractableOptions = {
1264
1330
  y: number;
1265
1331
  z: number;
1266
1332
  };
1333
+ /** How many hands may hold it, and whether a second grab transfers it. */
1334
+ grabHands?: XrGrabHands;
1335
+ /** Whether the second hand aims the object or only scales it. */
1336
+ twoHandRotation?: XrTwoHandRotation;
1337
+ /** Let a two-hand grab resize the object by moving the hands apart. */
1338
+ allowTwoHandScale?: boolean;
1339
+ /** Smallest fraction of its size a single scaling gesture may reach. */
1340
+ minScale?: number;
1341
+ /** Largest multiple of its size a single scaling gesture may reach. */
1342
+ maxScale?: number;
1343
+ /** Authored hand-holds. Empty means grab anywhere. */
1344
+ attachPoints?: XrAttachPoint[];
1267
1345
  /** Carry the hand's momentum into the body on release. */
1268
1346
  throwOnRelease?: boolean;
1269
1347
  /** Scales released velocity; >1 makes throws feel stronger than real life. */
1270
1348
  throwStrength?: number;
1271
- highlightOnHover?: boolean;
1349
+ /** Feedback shown while a pointer is on the object. */
1350
+ hoverBehavior?: XrHoverBehavior;
1351
+ /** Outline colour used by the `color` and `both` behaviours. */
1352
+ hoverColor?: string;
1353
+ /** Size multiplier used by the `scale` and `both` behaviours. */
1354
+ hoverScale?: number;
1272
1355
  };
1273
1356
  /**
1274
1357
  * Makes an entity respond to XR pointers and hands.
@@ -1283,7 +1366,6 @@ declare class XRInteractableComponent extends Component {
1283
1366
  enabled: boolean;
1284
1367
  grabbable: boolean;
1285
1368
  pointable: boolean;
1286
- grabMode: XrGrabMode;
1287
1369
  /** Whether the object can be grabbed up close, at range, or either. */
1288
1370
  grabReach: XrGrabReach;
1289
1371
  /** What a distance grab does — bring it here, or manipulate it in place. */
@@ -1304,13 +1386,34 @@ declare class XRInteractableComponent extends Component {
1304
1386
  y: number;
1305
1387
  z: number;
1306
1388
  };
1389
+ /** How many hands may hold it, and whether a second grab transfers it. */
1390
+ grabHands: XrGrabHands;
1391
+ /** Whether the second hand aims the object or only scales it. */
1392
+ twoHandRotation: XrTwoHandRotation;
1393
+ /** Whether a two-hand grab may resize the object. */
1394
+ allowTwoHandScale: boolean;
1395
+ /** Scale floor for one gesture, as a fraction of the size at grab time. */
1396
+ minScale: number;
1397
+ /** Scale ceiling for one gesture, as a multiple of the size at grab time. */
1398
+ maxScale: number;
1399
+ /** Authored hand-holds; empty means grab anywhere. */
1400
+ attachPoints: XrAttachPoint[];
1307
1401
  /** Carry hand momentum into the body on release. */
1308
1402
  throwOnRelease: boolean;
1309
1403
  /** Multiplier on released velocity. */
1310
1404
  throwStrength: number;
1311
- highlightOnHover: boolean;
1405
+ /** Feedback shown while a pointer is on the object. */
1406
+ hoverBehavior: XrHoverBehavior;
1407
+ /** Outline colour for the `color` and `both` behaviours. */
1408
+ hoverColor: string;
1409
+ /** Size multiplier for the `scale` and `both` behaviours. */
1410
+ hoverScale: number;
1312
1411
  constructor(options?: XRInteractableOptions);
1313
1412
  }
1413
+ /** An attach point with every field populated, for the editor and AI tools. */
1414
+ declare function createAttachPoint(partial: Partial<XrAttachPoint> & {
1415
+ id: string;
1416
+ }): XrAttachPoint;
1314
1417
 
1315
1418
  /**
1316
1419
  * Where the headset's origin sits in the scene.
@@ -1508,4 +1611,4 @@ declare class XRHandPoseComponent extends Component {
1508
1611
  constructor(options?: XRHandPoseOptions);
1509
1612
  }
1510
1613
 
1511
- export { SelectionTransformState as $, AnimationComponent as A, MeshComponent as B, CameraComponent as C, DEFAULT_COLLIDER_STATE as D, type EditableMeshObjectKind as E, MeshGeometryComponent as F, type MeshGeometryParameters as G, type MeshGeometryParametersByKind as H, ImageComponent as I, ModelComponent as J, type PhysicsState as K, LightComponent as L, MaterialComponent as M, Name as N, Object3DRef as O, PhysicsComponent as P, type PlaneMeshParameters as Q, type RadiusHeightMeshParameters as R, type RadiusMeshParameters as S, type RigidbodyState as T, type RigidbodyType as U, ScriptComponent as V, type ScriptEntry as W, ScriptObjectComponent as X, type ScriptObjectComponentInput as Y, type ScriptObjectRuntimeState as Z, Selectable as _, type AnimationComponentOptions as a, SpriteComponent as a0, type TextureFilteringValue as a1, type TransformModeValue as a2, type TransformSpaceValue as a3, VRTeleportAreaComponent as a4, type VRTeleportAreaOptions as a5, VideoComponent as a6, type VrTeleportShape as a7, XRHandPoseComponent as a8, type XRHandPoseOptions as a9, XRInteractableComponent as aa, type XRInteractableOptions as ab, XRInteractorComponent as ac, type XRInteractorOptions as ad, XRInteractorSideComponent as ae, XRRigComponent as af, type XRRigOptions as ag, type XrGrabMode as ah, type XrHandPoseEntry as ai, type XrHandPreset as aj, type XrInteractorSide as ak, type XrInteractorType as al, type XrLocomotionMode as am, type XrTrackingOrigin as an, createHandPoseEntry as ao, defaultMaterialValue as ap, handPoseDefinitionFor as aq, normalizePhysicsState as ar, setPhysicsLiveRef as as, type AnimationStateCallbacks as at, AnimationStateMachine as au, AnimationStateManager as av, type StateMachine as aw, AudioComponent as b, type CameraComponentOptions as c, type CameraProjection as d, type CameraRuntimeType as e, type ColliderShape as f, type ColliderState as g, type CubeMeshParameters as h, DEFAULT_INSTANCED_MESH_PARAMETERS as i, DEFAULT_INSTANCE_TRANSFORM as j, DEFAULT_MESH_GEOMETRY_PARAMETERS as k, DEFAULT_PHYSICS_STATE as l, DEFAULT_POSE_CURLS as m, DEFAULT_RIGIDBODY_STATE as n, EntityType as o, ImageTarget as p, ImageTargetAnchor as q, type ImageTargetAnchorOptions as r, type ImageTargetReference as s, InstanceSlotComponent as t, type InstanceTransform as u, InstancedMeshComponent as v, type InstancedMeshKind as w, type LightValueState as x, type MaterialTypeValue as y, type MaterialValueState as z };
1614
+ export { SelectionTransformState as $, AnimationComponent as A, MeshComponent as B, CameraComponent as C, DEFAULT_COLLIDER_STATE as D, type EditableMeshObjectKind as E, MeshGeometryComponent as F, type MeshGeometryParameters as G, type MeshGeometryParametersByKind as H, ImageComponent as I, ModelComponent as J, type PhysicsState as K, LightComponent as L, MaterialComponent as M, Name as N, Object3DRef as O, PhysicsComponent as P, type PlaneMeshParameters as Q, type RadiusHeightMeshParameters as R, type RadiusMeshParameters as S, type RigidbodyState as T, type RigidbodyType as U, ScriptComponent as V, type ScriptEntry as W, ScriptObjectComponent as X, type ScriptObjectComponentInput as Y, type ScriptObjectRuntimeState as Z, Selectable as _, type AnimationComponentOptions as a, SpriteComponent as a0, type TextureFilteringValue as a1, type TransformModeValue as a2, type TransformSpaceValue as a3, VRTeleportAreaComponent as a4, type VRTeleportAreaOptions as a5, VideoComponent as a6, type VrTeleportShape as a7, XRHandPoseComponent as a8, type XRHandPoseOptions as a9, AnimationStateMachine as aA, AnimationStateManager as aB, type StateMachine as aC, XRInteractableComponent as aa, type XRInteractableOptions as ab, XRInteractorComponent as ac, type XRInteractorOptions as ad, XRInteractorSideComponent as ae, XRRigComponent as af, type XRRigOptions as ag, type XrAttachPoint as ah, type XrDistanceGrabBehavior as ai, type XrGrabGesture as aj, type XrGrabHands as ak, type XrGrabReach as al, type XrHandPoseEntry as am, type XrHandPreset as an, type XrInteractorSide as ao, type XrInteractorType as ap, type XrLocomotionMode as aq, type XrTrackingOrigin as ar, type XrTwoHandRotation as as, createAttachPoint as at, createHandPoseEntry as au, defaultMaterialValue as av, handPoseDefinitionFor as aw, normalizePhysicsState as ax, setPhysicsLiveRef as ay, type AnimationStateCallbacks as az, AudioComponent as b, type CameraComponentOptions as c, type CameraProjection as d, type CameraRuntimeType as e, type ColliderShape as f, type ColliderState as g, type CubeMeshParameters as h, DEFAULT_INSTANCED_MESH_PARAMETERS as i, DEFAULT_INSTANCE_TRANSFORM as j, DEFAULT_MESH_GEOMETRY_PARAMETERS as k, DEFAULT_PHYSICS_STATE as l, DEFAULT_POSE_CURLS as m, DEFAULT_RIGIDBODY_STATE as n, EntityType as o, ImageTarget as p, ImageTargetAnchor as q, type ImageTargetAnchorOptions as r, type ImageTargetReference as s, InstanceSlotComponent as t, type InstanceTransform as u, InstancedMeshComponent as v, type InstancedMeshKind as w, type LightValueState as x, type MaterialTypeValue as y, type MaterialValueState as z };
@@ -610,10 +610,36 @@ declare function normalizePhysicsState(value: {
610
610
  * ENUMERABLE property from plain assignment, leaking Rapier objects — and for
611
611
  * trimesh their huge vertex buffers — into snapshot/history/debug walks.
612
612
  */
613
- declare function setPhysicsLiveRef(component: PhysicsComponent, key: "rigidBody" | "collider", value: RapierRigidBody | RapierCollider | null): void;
613
+ /**
614
+ * A velocity waiting to be applied to the body, in world space.
615
+ *
616
+ * Needed because a throw is decided while the body is still kinematic (the hand
617
+ * was holding it), and Rapier ignores velocity on kinematic bodies. Queueing it
618
+ * lets `PhysicsSyncSystem` apply it in the same tick it turns the body dynamic
619
+ * again, which is the only moment the velocity actually takes.
620
+ */
621
+ type PendingBodyVelocity = {
622
+ linear: {
623
+ x: number;
624
+ y: number;
625
+ z: number;
626
+ };
627
+ angular: {
628
+ x: number;
629
+ y: number;
630
+ z: number;
631
+ };
632
+ };
633
+ declare function setPhysicsLiveRef(component: PhysicsComponent, key: "rigidBody" | "collider" | "pendingVelocity", value: RapierRigidBody | RapierCollider | PendingBodyVelocity | null): void;
614
634
  declare class PhysicsComponent extends Component {
615
635
  /** Authoring state. Saved with the project. */
616
636
  values: PhysicsState;
637
+ /**
638
+ * Velocity to apply the moment this body becomes dynamic again.
639
+ *
640
+ * Non-enumerable, like the Rapier refs — never serialized.
641
+ */
642
+ pendingVelocity?: PendingBodyVelocity | null;
617
643
  /**
618
644
  * Live Rapier rigid body. `null` until physics is initialized.
619
645
  * NON-ENUMERABLE — Rapier wrappers (and, for trimesh, their vertex buffers)
@@ -1208,14 +1234,6 @@ declare class VRTeleportAreaComponent extends Component {
1208
1234
  constructor(options?: VRTeleportAreaOptions);
1209
1235
  }
1210
1236
 
1211
- /**
1212
- * How an entity behaves while held.
1213
- *
1214
- * `kinematic` snaps it to the hand and ignores physics — predictable, and right
1215
- * for tools and UI. `physics` keeps the body simulated so it can collide while
1216
- * held and, crucially, carry momentum when released (see {@link throwOnRelease}).
1217
- */
1218
- type XrGrabMode = "kinematic" | "physics";
1219
1237
  /**
1220
1238
  * How close the user must be to grab.
1221
1239
  *
@@ -1241,12 +1259,60 @@ type XrDistanceGrabBehavior = "snap" | "remote";
1241
1259
  * precise pickups with firm grabs — a chess piece versus a suitcase handle.
1242
1260
  */
1243
1261
  type XrGrabGesture = "any" | "pinch" | "full";
1262
+ /**
1263
+ * A hand-hold authored on the object.
1264
+ *
1265
+ * Without attach points a hand grabs wherever it happens to touch, which is
1266
+ * right for a ball and wrong for a rifle — a weapon has a grip and a foregrip,
1267
+ * and the hands belong on those exact spots. `role` is what lets an author say
1268
+ * "this is the trigger hand's hold" so a two-hand grab assembles correctly no
1269
+ * matter which hand arrives first.
1270
+ */
1271
+ type XrAttachPoint = {
1272
+ /** Stable id; referenced by scripts and by the inspector list. */
1273
+ id: string;
1274
+ name: string;
1275
+ /** Object-local position of the hold (unscaled). */
1276
+ position: {
1277
+ x: number;
1278
+ y: number;
1279
+ z: number;
1280
+ };
1281
+ /** Object-local orientation of the hold, radians. */
1282
+ rotation: {
1283
+ x: number;
1284
+ y: number;
1285
+ z: number;
1286
+ };
1287
+ /** Restrict to one hand, or `any`. */
1288
+ hand: "left" | "right" | "any";
1289
+ /** Whether this hold is the anchoring hand, the steering hand, or either. */
1290
+ role: "primary" | "secondary" | "any";
1291
+ };
1292
+ /**
1293
+ * How many hands may hold the object at once, and what a second grab does.
1294
+ *
1295
+ * `single` is a plain pickup. `handOff` lets the other hand TAKE it — the
1296
+ * everyday gesture of passing something between your hands. `two` keeps both
1297
+ * hands on it, which is what enables aiming a two-handed weapon and
1298
+ * pull-apart scaling.
1299
+ */
1300
+ type XrGrabHands = "single" | "handOff" | "two";
1301
+ /** How the second hand affects orientation. See `solveTwoHandTransform`. */
1302
+ type XrTwoHandRotation = "align" | "primary";
1303
+ /**
1304
+ * What an object does when a pointer lands on it.
1305
+ *
1306
+ * Hover feedback is what tells the user the ray has actually caught something —
1307
+ * without it, aiming at a grabbable object and aiming at empty space look
1308
+ * identical.
1309
+ */
1310
+ type XrHoverBehavior = "none" | "color" | "scale" | "both";
1244
1311
  /** Optional initializer for {@link XRInteractableComponent}. */
1245
1312
  type XRInteractableOptions = {
1246
1313
  enabled?: boolean;
1247
1314
  grabbable?: boolean;
1248
1315
  pointable?: boolean;
1249
- grabMode?: XrGrabMode;
1250
1316
  grabReach?: XrGrabReach;
1251
1317
  distanceBehavior?: XrDistanceGrabBehavior;
1252
1318
  grabGesture?: XrGrabGesture;
@@ -1264,11 +1330,28 @@ type XRInteractableOptions = {
1264
1330
  y: number;
1265
1331
  z: number;
1266
1332
  };
1333
+ /** How many hands may hold it, and whether a second grab transfers it. */
1334
+ grabHands?: XrGrabHands;
1335
+ /** Whether the second hand aims the object or only scales it. */
1336
+ twoHandRotation?: XrTwoHandRotation;
1337
+ /** Let a two-hand grab resize the object by moving the hands apart. */
1338
+ allowTwoHandScale?: boolean;
1339
+ /** Smallest fraction of its size a single scaling gesture may reach. */
1340
+ minScale?: number;
1341
+ /** Largest multiple of its size a single scaling gesture may reach. */
1342
+ maxScale?: number;
1343
+ /** Authored hand-holds. Empty means grab anywhere. */
1344
+ attachPoints?: XrAttachPoint[];
1267
1345
  /** Carry the hand's momentum into the body on release. */
1268
1346
  throwOnRelease?: boolean;
1269
1347
  /** Scales released velocity; >1 makes throws feel stronger than real life. */
1270
1348
  throwStrength?: number;
1271
- highlightOnHover?: boolean;
1349
+ /** Feedback shown while a pointer is on the object. */
1350
+ hoverBehavior?: XrHoverBehavior;
1351
+ /** Outline colour used by the `color` and `both` behaviours. */
1352
+ hoverColor?: string;
1353
+ /** Size multiplier used by the `scale` and `both` behaviours. */
1354
+ hoverScale?: number;
1272
1355
  };
1273
1356
  /**
1274
1357
  * Makes an entity respond to XR pointers and hands.
@@ -1283,7 +1366,6 @@ declare class XRInteractableComponent extends Component {
1283
1366
  enabled: boolean;
1284
1367
  grabbable: boolean;
1285
1368
  pointable: boolean;
1286
- grabMode: XrGrabMode;
1287
1369
  /** Whether the object can be grabbed up close, at range, or either. */
1288
1370
  grabReach: XrGrabReach;
1289
1371
  /** What a distance grab does — bring it here, or manipulate it in place. */
@@ -1304,13 +1386,34 @@ declare class XRInteractableComponent extends Component {
1304
1386
  y: number;
1305
1387
  z: number;
1306
1388
  };
1389
+ /** How many hands may hold it, and whether a second grab transfers it. */
1390
+ grabHands: XrGrabHands;
1391
+ /** Whether the second hand aims the object or only scales it. */
1392
+ twoHandRotation: XrTwoHandRotation;
1393
+ /** Whether a two-hand grab may resize the object. */
1394
+ allowTwoHandScale: boolean;
1395
+ /** Scale floor for one gesture, as a fraction of the size at grab time. */
1396
+ minScale: number;
1397
+ /** Scale ceiling for one gesture, as a multiple of the size at grab time. */
1398
+ maxScale: number;
1399
+ /** Authored hand-holds; empty means grab anywhere. */
1400
+ attachPoints: XrAttachPoint[];
1307
1401
  /** Carry hand momentum into the body on release. */
1308
1402
  throwOnRelease: boolean;
1309
1403
  /** Multiplier on released velocity. */
1310
1404
  throwStrength: number;
1311
- highlightOnHover: boolean;
1405
+ /** Feedback shown while a pointer is on the object. */
1406
+ hoverBehavior: XrHoverBehavior;
1407
+ /** Outline colour for the `color` and `both` behaviours. */
1408
+ hoverColor: string;
1409
+ /** Size multiplier for the `scale` and `both` behaviours. */
1410
+ hoverScale: number;
1312
1411
  constructor(options?: XRInteractableOptions);
1313
1412
  }
1413
+ /** An attach point with every field populated, for the editor and AI tools. */
1414
+ declare function createAttachPoint(partial: Partial<XrAttachPoint> & {
1415
+ id: string;
1416
+ }): XrAttachPoint;
1314
1417
 
1315
1418
  /**
1316
1419
  * Where the headset's origin sits in the scene.
@@ -1508,4 +1611,4 @@ declare class XRHandPoseComponent extends Component {
1508
1611
  constructor(options?: XRHandPoseOptions);
1509
1612
  }
1510
1613
 
1511
- export { SelectionTransformState as $, AnimationComponent as A, MeshComponent as B, CameraComponent as C, DEFAULT_COLLIDER_STATE as D, type EditableMeshObjectKind as E, MeshGeometryComponent as F, type MeshGeometryParameters as G, type MeshGeometryParametersByKind as H, ImageComponent as I, ModelComponent as J, type PhysicsState as K, LightComponent as L, MaterialComponent as M, Name as N, Object3DRef as O, PhysicsComponent as P, type PlaneMeshParameters as Q, type RadiusHeightMeshParameters as R, type RadiusMeshParameters as S, type RigidbodyState as T, type RigidbodyType as U, ScriptComponent as V, type ScriptEntry as W, ScriptObjectComponent as X, type ScriptObjectComponentInput as Y, type ScriptObjectRuntimeState as Z, Selectable as _, type AnimationComponentOptions as a, SpriteComponent as a0, type TextureFilteringValue as a1, type TransformModeValue as a2, type TransformSpaceValue as a3, VRTeleportAreaComponent as a4, type VRTeleportAreaOptions as a5, VideoComponent as a6, type VrTeleportShape as a7, XRHandPoseComponent as a8, type XRHandPoseOptions as a9, XRInteractableComponent as aa, type XRInteractableOptions as ab, XRInteractorComponent as ac, type XRInteractorOptions as ad, XRInteractorSideComponent as ae, XRRigComponent as af, type XRRigOptions as ag, type XrGrabMode as ah, type XrHandPoseEntry as ai, type XrHandPreset as aj, type XrInteractorSide as ak, type XrInteractorType as al, type XrLocomotionMode as am, type XrTrackingOrigin as an, createHandPoseEntry as ao, defaultMaterialValue as ap, handPoseDefinitionFor as aq, normalizePhysicsState as ar, setPhysicsLiveRef as as, type AnimationStateCallbacks as at, AnimationStateMachine as au, AnimationStateManager as av, type StateMachine as aw, AudioComponent as b, type CameraComponentOptions as c, type CameraProjection as d, type CameraRuntimeType as e, type ColliderShape as f, type ColliderState as g, type CubeMeshParameters as h, DEFAULT_INSTANCED_MESH_PARAMETERS as i, DEFAULT_INSTANCE_TRANSFORM as j, DEFAULT_MESH_GEOMETRY_PARAMETERS as k, DEFAULT_PHYSICS_STATE as l, DEFAULT_POSE_CURLS as m, DEFAULT_RIGIDBODY_STATE as n, EntityType as o, ImageTarget as p, ImageTargetAnchor as q, type ImageTargetAnchorOptions as r, type ImageTargetReference as s, InstanceSlotComponent as t, type InstanceTransform as u, InstancedMeshComponent as v, type InstancedMeshKind as w, type LightValueState as x, type MaterialTypeValue as y, type MaterialValueState as z };
1614
+ export { SelectionTransformState as $, AnimationComponent as A, MeshComponent as B, CameraComponent as C, DEFAULT_COLLIDER_STATE as D, type EditableMeshObjectKind as E, MeshGeometryComponent as F, type MeshGeometryParameters as G, type MeshGeometryParametersByKind as H, ImageComponent as I, ModelComponent as J, type PhysicsState as K, LightComponent as L, MaterialComponent as M, Name as N, Object3DRef as O, PhysicsComponent as P, type PlaneMeshParameters as Q, type RadiusHeightMeshParameters as R, type RadiusMeshParameters as S, type RigidbodyState as T, type RigidbodyType as U, ScriptComponent as V, type ScriptEntry as W, ScriptObjectComponent as X, type ScriptObjectComponentInput as Y, type ScriptObjectRuntimeState as Z, Selectable as _, type AnimationComponentOptions as a, SpriteComponent as a0, type TextureFilteringValue as a1, type TransformModeValue as a2, type TransformSpaceValue as a3, VRTeleportAreaComponent as a4, type VRTeleportAreaOptions as a5, VideoComponent as a6, type VrTeleportShape as a7, XRHandPoseComponent as a8, type XRHandPoseOptions as a9, AnimationStateMachine as aA, AnimationStateManager as aB, type StateMachine as aC, XRInteractableComponent as aa, type XRInteractableOptions as ab, XRInteractorComponent as ac, type XRInteractorOptions as ad, XRInteractorSideComponent as ae, XRRigComponent as af, type XRRigOptions as ag, type XrAttachPoint as ah, type XrDistanceGrabBehavior as ai, type XrGrabGesture as aj, type XrGrabHands as ak, type XrGrabReach as al, type XrHandPoseEntry as am, type XrHandPreset as an, type XrInteractorSide as ao, type XrInteractorType as ap, type XrLocomotionMode as aq, type XrTrackingOrigin as ar, type XrTwoHandRotation as as, createAttachPoint as at, createHandPoseEntry as au, defaultMaterialValue as av, handPoseDefinitionFor as aw, normalizePhysicsState as ax, setPhysicsLiveRef as ay, type AnimationStateCallbacks as az, AudioComponent as b, type CameraComponentOptions as c, type CameraProjection as d, type CameraRuntimeType as e, type ColliderShape as f, type ColliderState as g, type CubeMeshParameters as h, DEFAULT_INSTANCED_MESH_PARAMETERS as i, DEFAULT_INSTANCE_TRANSFORM as j, DEFAULT_MESH_GEOMETRY_PARAMETERS as k, DEFAULT_PHYSICS_STATE as l, DEFAULT_POSE_CURLS as m, DEFAULT_RIGIDBODY_STATE as n, EntityType as o, ImageTarget as p, ImageTargetAnchor as q, type ImageTargetAnchorOptions as r, type ImageTargetReference as s, InstanceSlotComponent as t, type InstanceTransform as u, InstancedMeshComponent as v, type InstancedMeshKind as w, type LightValueState as x, type MaterialTypeValue as y, type MaterialValueState as z };
@@ -1,5 +1,5 @@
1
- import { createTransform, applyTransform, resolveDracoDecoderPath, loadSharedGltf, cloneModelScene } from './chunk-L5BP727H.js';
2
- import { AnimationComponent, AudioComponent, Object3DRef, CameraComponent, MeshGeometryComponent, PhysicsComponent, Environment, EntityType, ImageComponent, ImageTargetAnchor, ImageTarget, LightComponent, MaterialComponent, MeshComponent, ModelComponent, Name, ParentId, Postprocessing, ScriptComponent, ScriptObjectComponent, Selectable, SelectionTransformState, SpriteComponent, TransformComponent, InstancedMeshComponent, InstanceSlotComponent, VideoComponent, XRRigComponent, VRTeleportAreaComponent, XRHandPoseComponent, XRInteractableComponent, XRInteractorComponent, XRInteractorSideComponent, DEFAULT_INSTANCE_TRANSFORM } from './chunk-KVGGAL5V.js';
1
+ import { createTransform, applyTransform, resolveDracoDecoderPath, loadSharedGltf, cloneModelScene } from './chunk-Y3AC3VZ2.js';
2
+ import { AnimationComponent, AudioComponent, Object3DRef, CameraComponent, MeshGeometryComponent, PhysicsComponent, Environment, EntityType, ImageComponent, ImageTargetAnchor, ImageTarget, LightComponent, MaterialComponent, MeshComponent, ModelComponent, Name, ParentId, Postprocessing, ScriptComponent, ScriptObjectComponent, Selectable, SelectionTransformState, SpriteComponent, TransformComponent, InstancedMeshComponent, InstanceSlotComponent, VideoComponent, XRRigComponent, VRTeleportAreaComponent, XRHandPoseComponent, XRInteractableComponent, XRInteractorComponent, XRInteractorSideComponent, DEFAULT_INSTANCE_TRANSFORM } from './chunk-TXEGYR76.js';
3
3
  import { __name } from './chunk-OY7ZODZP.js';
4
4
  import * as THREE25 from 'three';
5
5
  import { RectAreaLightHelper } from 'three/examples/jsm/helpers/RectAreaLightHelper.js';
@@ -1665,5 +1665,5 @@ function registerDefaultFactories(objectManagementSystem) {
1665
1665
  __name(registerDefaultFactories, "registerDefaultFactories");
1666
1666
 
1667
1667
  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 };
1668
- //# sourceMappingURL=chunk-KIKIWCEB.js.map
1669
- //# sourceMappingURL=chunk-KIKIWCEB.js.map
1668
+ //# sourceMappingURL=chunk-FSHRPY65.js.map
1669
+ //# sourceMappingURL=chunk-FSHRPY65.js.map