@relu-interactives/spatial-ecs 0.3.8 → 0.3.10

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-CjacJ_16.d.ts} +70 -1
  2. package/dist/{XRHandPose-VuSbe4iz.d.cts → XRHandPose-hAtj9wm-.d.cts} +70 -1
  3. package/dist/{chunk-KIKIWCEB.js → chunk-5UVBEAGW.js} +4 -4
  4. package/dist/{chunk-KIKIWCEB.js.map → chunk-5UVBEAGW.js.map} +1 -1
  5. package/dist/{chunk-KVGGAL5V.js → chunk-ELSZ5U3F.js} +23 -3
  6. package/dist/chunk-ELSZ5U3F.js.map +1 -0
  7. package/dist/{chunk-L5BP727H.js → chunk-NJOO7NO6.js} +3 -3
  8. package/dist/{chunk-L5BP727H.js.map → chunk-NJOO7NO6.js.map} +1 -1
  9. package/dist/{chunk-LMTB4KQ4.js → chunk-O2HSIZFC.js} +591 -195
  10. package/dist/chunk-O2HSIZFC.js.map +1 -0
  11. package/dist/components/index.cjs +20 -0
  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 +48 -0
  17. package/dist/factories/index.cjs +19 -0
  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-B-KhN8Ox.d.ts} +51 -0
  23. package/dist/{index-BxdXgqiI.d.ts → index-B7JDsx4a.d.ts} +9 -2
  24. package/dist/{index-BIQoaKAA.d.cts → index-B9JqYr3Q.d.cts} +9 -2
  25. package/dist/{index-DyN50JZo.d.cts → index-DU-CF-3m.d.cts} +51 -0
  26. package/dist/index.cjs +729 -312
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.d.cts +29 -6
  29. package/dist/index.d.ts +29 -6
  30. package/dist/index.js +8 -8
  31. package/dist/systems/index.cjs +635 -220
  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-LMTB4KQ4.js.map +0 -1
@@ -1931,6 +1931,14 @@ var _XRInteractableComponent = class _XRInteractableComponent extends Component
1931
1931
  y: 0,
1932
1932
  z: 0
1933
1933
  };
1934
+ this.grabHands = options?.grabHands ?? "handOff";
1935
+ this.twoHandRotation = options?.twoHandRotation ?? "align";
1936
+ this.allowTwoHandScale = options?.allowTwoHandScale ?? false;
1937
+ this.minScale = options?.minScale ?? 0.25;
1938
+ this.maxScale = options?.maxScale ?? 4;
1939
+ this.attachPoints = (options?.attachPoints ?? []).map(
1940
+ (point) => createAttachPoint(point)
1941
+ );
1934
1942
  this.throwOnRelease = options?.throwOnRelease ?? true;
1935
1943
  this.throwStrength = options?.throwStrength ?? 1;
1936
1944
  this.highlightOnHover = options?.highlightOnHover ?? true;
@@ -1938,6 +1946,17 @@ var _XRInteractableComponent = class _XRInteractableComponent extends Component
1938
1946
  };
1939
1947
  __name(_XRInteractableComponent, "XRInteractableComponent");
1940
1948
  var XRInteractableComponent = _XRInteractableComponent;
1949
+ function createAttachPoint(partial) {
1950
+ return {
1951
+ id: partial.id,
1952
+ name: partial.name ?? partial.id,
1953
+ position: { x: 0, y: 0, z: 0, ...partial.position },
1954
+ rotation: { x: 0, y: 0, z: 0, ...partial.rotation },
1955
+ hand: partial.hand ?? "any",
1956
+ role: partial.role ?? "any"
1957
+ };
1958
+ }
1959
+ __name(createAttachPoint, "createAttachPoint");
1941
1960
 
1942
1961
  // core/components/XRRig.ts
1943
1962
  var _XRRigComponent = class _XRRigComponent extends Component {
@@ -2099,6 +2118,7 @@ exports.XRInteractableComponent = XRInteractableComponent;
2099
2118
  exports.XRInteractorComponent = XRInteractorComponent;
2100
2119
  exports.XRInteractorSideComponent = XRInteractorSideComponent;
2101
2120
  exports.XRRigComponent = XRRigComponent;
2121
+ exports.createAttachPoint = createAttachPoint;
2102
2122
  exports.createHandPoseEntry = createHandPoseEntry;
2103
2123
  exports.defaultMaterialValue = defaultMaterialValue;
2104
2124
  exports.handPoseDefinitionFor = handPoseDefinitionFor;