@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
@@ -49,6 +49,7 @@ __export(components_exports, {
49
49
  XRInteractorComponent: () => XRInteractorComponent,
50
50
  XRInteractorSideComponent: () => XRInteractorSideComponent,
51
51
  XRRigComponent: () => XRRigComponent,
52
+ createAttachPoint: () => createAttachPoint,
52
53
  createHandPoseEntry: () => createHandPoseEntry,
53
54
  defaultMaterialValue: () => defaultMaterialValue,
54
55
  handPoseDefinitionFor: () => handPoseDefinitionFor,
@@ -1941,7 +1942,6 @@ var _XRInteractableComponent = class _XRInteractableComponent extends Component
1941
1942
  this.enabled = options?.enabled ?? true;
1942
1943
  this.grabbable = options?.grabbable ?? true;
1943
1944
  this.pointable = options?.pointable ?? true;
1944
- this.grabMode = options?.grabMode ?? "kinematic";
1945
1945
  this.grabReach = options?.grabReach ?? "both";
1946
1946
  this.distanceBehavior = options?.distanceBehavior ?? "snap";
1947
1947
  this.grabGesture = options?.grabGesture ?? "any";
@@ -1956,13 +1956,34 @@ var _XRInteractableComponent = class _XRInteractableComponent extends Component
1956
1956
  y: 0,
1957
1957
  z: 0
1958
1958
  };
1959
+ this.grabHands = options?.grabHands ?? "handOff";
1960
+ this.twoHandRotation = options?.twoHandRotation ?? "align";
1961
+ this.allowTwoHandScale = options?.allowTwoHandScale ?? false;
1962
+ this.minScale = options?.minScale ?? 0.25;
1963
+ this.maxScale = options?.maxScale ?? 4;
1964
+ this.attachPoints = (options?.attachPoints ?? []).map(
1965
+ (point) => createAttachPoint(point)
1966
+ );
1959
1967
  this.throwOnRelease = options?.throwOnRelease ?? true;
1960
1968
  this.throwStrength = options?.throwStrength ?? 1;
1961
- this.highlightOnHover = options?.highlightOnHover ?? true;
1969
+ this.hoverBehavior = options?.hoverBehavior ?? "color";
1970
+ this.hoverColor = options?.hoverColor ?? "#4da3ff";
1971
+ this.hoverScale = options?.hoverScale ?? 1.06;
1962
1972
  }
1963
1973
  };
1964
1974
  __name(_XRInteractableComponent, "XRInteractableComponent");
1965
1975
  var XRInteractableComponent = _XRInteractableComponent;
1976
+ function createAttachPoint(partial) {
1977
+ return {
1978
+ id: partial.id,
1979
+ name: partial.name ?? partial.id,
1980
+ position: { x: 0, y: 0, z: 0, ...partial.position },
1981
+ rotation: { x: 0, y: 0, z: 0, ...partial.rotation },
1982
+ hand: partial.hand ?? "any",
1983
+ role: partial.role ?? "any"
1984
+ };
1985
+ }
1986
+ __name(createAttachPoint, "createAttachPoint");
1966
1987
 
1967
1988
  // core/components/XRRig.ts
1968
1989
  var _XRRigComponent = class _XRRigComponent extends Component {
@@ -2206,6 +2227,6 @@ var _XRHandPoseComponent = class _XRHandPoseComponent extends Component {
2206
2227
  __name(_XRHandPoseComponent, "XRHandPoseComponent");
2207
2228
  var XRHandPoseComponent = _XRHandPoseComponent;
2208
2229
 
2209
- export { AnimationComponent, AnimationStateMachine, AnimationStateManager, AudioComponent, CameraComponent, DEFAULT_COLLIDER_STATE, DEFAULT_ENVIRONMENT_STATE, DEFAULT_INSTANCED_MESH_PARAMETERS, DEFAULT_INSTANCE_TRANSFORM, DEFAULT_MESH_GEOMETRY_PARAMETERS, DEFAULT_PHYSICS_STATE, DEFAULT_POSE_CURLS, DEFAULT_POSTPROCESSING_STATE, DEFAULT_RIGIDBODY_STATE, EntityType, Environment, HAND_POSE_PRESETS, HAND_POSE_PRESET_IDS, ImageComponent, ImageTarget, ImageTargetAnchor, InstanceSlotComponent, InstancedMeshComponent, LightComponent, MaterialComponent, MeshComponent, MeshGeometryComponent, ModelComponent, Name, Object3DRef, ParentId, PhysicsComponent, Postprocessing, PrefabInstance, PrefabNode, ScriptComponent, ScriptObjectComponent, Selectable, SelectionTransformState, SpriteComponent, TransformComponent, VRTeleportAreaComponent, VideoComponent, XRHandPoseComponent, XRInteractableComponent, XRInteractorComponent, XRInteractorSideComponent, XRRigComponent, cloneHandPose, components_exports, createHandPoseEntry, defaultMaterialValue, getHandPosePreset, handPoseDefinitionFor, handPoseFromCurls, normalizePhysicsState, setPhysicsLiveRef };
2210
- //# sourceMappingURL=chunk-KVGGAL5V.js.map
2211
- //# sourceMappingURL=chunk-KVGGAL5V.js.map
2230
+ export { AnimationComponent, AnimationStateMachine, AnimationStateManager, AudioComponent, CameraComponent, DEFAULT_COLLIDER_STATE, DEFAULT_ENVIRONMENT_STATE, DEFAULT_INSTANCED_MESH_PARAMETERS, DEFAULT_INSTANCE_TRANSFORM, DEFAULT_MESH_GEOMETRY_PARAMETERS, DEFAULT_PHYSICS_STATE, DEFAULT_POSE_CURLS, DEFAULT_POSTPROCESSING_STATE, DEFAULT_RIGIDBODY_STATE, EntityType, Environment, HAND_POSE_PRESETS, HAND_POSE_PRESET_IDS, ImageComponent, ImageTarget, ImageTargetAnchor, InstanceSlotComponent, InstancedMeshComponent, LightComponent, MaterialComponent, MeshComponent, MeshGeometryComponent, ModelComponent, Name, Object3DRef, ParentId, PhysicsComponent, Postprocessing, PrefabInstance, PrefabNode, ScriptComponent, ScriptObjectComponent, Selectable, SelectionTransformState, SpriteComponent, TransformComponent, VRTeleportAreaComponent, VideoComponent, XRHandPoseComponent, XRInteractableComponent, XRInteractorComponent, XRInteractorSideComponent, XRRigComponent, cloneHandPose, components_exports, createAttachPoint, createHandPoseEntry, defaultMaterialValue, getHandPosePreset, handPoseDefinitionFor, handPoseFromCurls, normalizePhysicsState, setPhysicsLiveRef };
2231
+ //# sourceMappingURL=chunk-TXEGYR76.js.map
2232
+ //# sourceMappingURL=chunk-TXEGYR76.js.map