@relu-interactives/spatial-ecs 0.3.9 → 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.
- package/dist/{XRHandPose-CxPz8VBp.d.ts → XRHandPose-CjacJ_16.d.ts} +70 -1
- package/dist/{XRHandPose-VuSbe4iz.d.cts → XRHandPose-hAtj9wm-.d.cts} +70 -1
- package/dist/{chunk-KIKIWCEB.js → chunk-5UVBEAGW.js} +4 -4
- package/dist/{chunk-KIKIWCEB.js.map → chunk-5UVBEAGW.js.map} +1 -1
- package/dist/{chunk-KVGGAL5V.js → chunk-ELSZ5U3F.js} +23 -3
- package/dist/chunk-ELSZ5U3F.js.map +1 -0
- package/dist/{chunk-L5BP727H.js → chunk-NJOO7NO6.js} +3 -3
- package/dist/{chunk-L5BP727H.js.map → chunk-NJOO7NO6.js.map} +1 -1
- package/dist/{chunk-W5TSYV6Q.js → chunk-O2HSIZFC.js} +572 -185
- package/dist/chunk-O2HSIZFC.js.map +1 -0
- package/dist/components/index.cjs +20 -0
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +2 -2
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +1 -1
- package/dist/docs/guide/vr-and-hand-poses.md +48 -0
- package/dist/factories/index.cjs +19 -0
- package/dist/factories/index.cjs.map +1 -1
- package/dist/factories/index.d.cts +1 -1
- package/dist/factories/index.d.ts +1 -1
- package/dist/factories/index.js +3 -3
- package/dist/{index-C7XQyrgE.d.ts → index-B-KhN8Ox.d.ts} +51 -0
- package/dist/{index-BxdXgqiI.d.ts → index-B7JDsx4a.d.ts} +9 -2
- package/dist/{index-BIQoaKAA.d.cts → index-B9JqYr3Q.d.cts} +9 -2
- package/dist/{index-DyN50JZo.d.cts → index-DU-CF-3m.d.cts} +51 -0
- package/dist/index.cjs +710 -303
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -5
- package/dist/index.d.ts +14 -5
- package/dist/index.js +8 -8
- package/dist/systems/index.cjs +617 -211
- package/dist/systems/index.cjs.map +1 -1
- package/dist/systems/index.d.cts +1 -1
- package/dist/systems/index.d.ts +1 -1
- package/dist/systems/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-KVGGAL5V.js.map +0 -1
- package/dist/chunk-W5TSYV6Q.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;
|