@relu-interactives/spatial-ecs 0.3.17 → 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.
- package/dist/{XRHandPose-LR4EhboN.d.cts → XRHandPose-CLl4MiHx.d.cts} +24 -2
- package/dist/{XRHandPose-SZ7ou63b.d.ts → XRHandPose-CrzI57JA.d.ts} +24 -2
- package/dist/{chunk-PNQ7HDQC.js → chunk-D6KXWNYT.js} +3 -3
- package/dist/{chunk-PNQ7HDQC.js.map → chunk-D6KXWNYT.js.map} +1 -1
- package/dist/{chunk-3LDQ4GVZ.js → chunk-H6DQ7JRE.js} +51 -18
- package/dist/chunk-H6DQ7JRE.js.map +1 -0
- package/dist/{chunk-CE2CPZSP.js → chunk-JYKFLQB5.js} +155 -36
- package/dist/chunk-JYKFLQB5.js.map +1 -0
- package/dist/{chunk-UHJ4MDIM.js → chunk-P42OE3RU.js} +4 -4
- package/dist/{chunk-UHJ4MDIM.js.map → chunk-P42OE3RU.js.map} +1 -1
- package/dist/components/index.cjs +36 -10
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +3 -3
- package/dist/components/index.d.ts +3 -3
- package/dist/components/index.js +1 -1
- package/dist/docs/guide/vr-and-hand-poses.md +68 -1
- package/dist/factories/index.cjs +11 -0
- package/dist/factories/index.cjs.map +1 -1
- package/dist/factories/index.d.cts +2 -2
- package/dist/factories/index.d.ts +2 -2
- package/dist/factories/index.js +3 -3
- package/dist/{handPose-dFxqbFFY.d.cts → handPose-DlcTtqgx.d.cts} +26 -1
- package/dist/{handPose-dFxqbFFY.d.ts → handPose-DlcTtqgx.d.ts} +26 -1
- package/dist/{index-ekS4iypo.d.cts → index-3pNbH0iP.d.cts} +23 -2
- package/dist/{index-uKFxVCmr.d.ts → index-C_589fc4.d.ts} +23 -2
- package/dist/{index-ByiUoIoh.d.ts → index-JRcoel9F.d.ts} +3 -2
- package/dist/{index-BL5EWkwY.d.cts → index-g777AmFv.d.cts} +3 -2
- package/dist/index.cjs +199 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -8
- package/dist/index.d.ts +11 -8
- package/dist/index.js +8 -8
- package/dist/systems/index.cjs +190 -46
- package/dist/systems/index.cjs.map +1 -1
- package/dist/systems/index.d.cts +2 -2
- package/dist/systems/index.d.ts +2 -2
- package/dist/systems/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-3LDQ4GVZ.js.map +0 -1
- package/dist/chunk-CE2CPZSP.js.map +0 -1
|
@@ -1969,6 +1969,9 @@ var _XRRigComponent = class _XRRigComponent extends Component {
|
|
|
1969
1969
|
this.snapTurn = options?.snapTurn ?? true;
|
|
1970
1970
|
this.snapTurnDegrees = options?.snapTurnDegrees ?? 30;
|
|
1971
1971
|
this.fallbackEyeHeight = options?.fallbackEyeHeight ?? 1.6;
|
|
1972
|
+
this.teleportArcColor = options?.teleportArcColor ?? "#4da3ff";
|
|
1973
|
+
this.teleportArcInvalidColor = options?.teleportArcInvalidColor ?? "#ff5a5a";
|
|
1974
|
+
this.teleportArcThickness = options?.teleportArcThickness ?? 0.012;
|
|
1972
1975
|
}
|
|
1973
1976
|
};
|
|
1974
1977
|
__name(_XRRigComponent, "XRRigComponent");
|
|
@@ -2005,22 +2008,27 @@ function fingers(thumb, index, middle, ring, pinky) {
|
|
|
2005
2008
|
__name(fingers, "fingers");
|
|
2006
2009
|
function handPoseFromCurls(id, name, curls, options) {
|
|
2007
2010
|
const tolerance = options?.tolerance ?? NARROW;
|
|
2008
|
-
const target = /* @__PURE__ */ __name((curl) =>
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2011
|
+
const target = /* @__PURE__ */ __name((finger, curl) => {
|
|
2012
|
+
const directions = options?.directions?.[finger];
|
|
2013
|
+
return {
|
|
2014
|
+
curl: Math.min(1, Math.max(0, curl)),
|
|
2015
|
+
tolerance,
|
|
2016
|
+
...directions && directions.length > 0 ? { directions } : {}
|
|
2017
|
+
};
|
|
2018
|
+
}, "target");
|
|
2012
2019
|
return {
|
|
2013
2020
|
id,
|
|
2014
2021
|
name,
|
|
2015
2022
|
fingers: {
|
|
2016
|
-
thumb: target(curls.thumb),
|
|
2017
|
-
index: target(curls.index),
|
|
2018
|
-
middle: target(curls.middle),
|
|
2019
|
-
ring: target(curls.ring),
|
|
2020
|
-
pinky: target(curls.pinky)
|
|
2023
|
+
thumb: target("thumb", curls.thumb),
|
|
2024
|
+
index: target("index", curls.index),
|
|
2025
|
+
middle: target("middle", curls.middle),
|
|
2026
|
+
ring: target("ring", curls.ring),
|
|
2027
|
+
pinky: target("pinky", curls.pinky)
|
|
2021
2028
|
},
|
|
2022
2029
|
pinch: options?.pinch,
|
|
2023
2030
|
orientation: options?.orientation,
|
|
2031
|
+
directionToleranceDegrees: options?.directionToleranceDegrees,
|
|
2024
2032
|
hand: options?.hand
|
|
2025
2033
|
};
|
|
2026
2034
|
}
|
|
@@ -2034,6 +2042,13 @@ var DEFAULT_POSE_CURLS = {
|
|
|
2034
2042
|
ring: 0,
|
|
2035
2043
|
pinky: 0
|
|
2036
2044
|
};
|
|
2045
|
+
var DEFAULT_POSE_DIRECTIONS = {
|
|
2046
|
+
thumb: [],
|
|
2047
|
+
index: [],
|
|
2048
|
+
middle: [],
|
|
2049
|
+
ring: [],
|
|
2050
|
+
pinky: []
|
|
2051
|
+
};
|
|
2037
2052
|
function createHandPoseEntry(partial) {
|
|
2038
2053
|
return {
|
|
2039
2054
|
id: partial.id,
|
|
@@ -2041,6 +2056,14 @@ function createHandPoseEntry(partial) {
|
|
|
2041
2056
|
preset: partial.preset ?? null,
|
|
2042
2057
|
curls: { ...DEFAULT_POSE_CURLS, ...partial.curls },
|
|
2043
2058
|
tolerance: partial.tolerance ?? 0.25,
|
|
2059
|
+
directions: {
|
|
2060
|
+
thumb: [...partial.directions?.thumb ?? []],
|
|
2061
|
+
index: [...partial.directions?.index ?? []],
|
|
2062
|
+
middle: [...partial.directions?.middle ?? []],
|
|
2063
|
+
ring: [...partial.directions?.ring ?? []],
|
|
2064
|
+
pinky: [...partial.directions?.pinky ?? []]
|
|
2065
|
+
},
|
|
2066
|
+
directionTolerance: partial.directionTolerance ?? 45,
|
|
2044
2067
|
hand: partial.hand ?? null,
|
|
2045
2068
|
orientation: partial.orientation ?? null,
|
|
2046
2069
|
minHoldSeconds: partial.minHoldSeconds ?? 0.15,
|
|
@@ -2063,7 +2086,9 @@ function handPoseDefinitionFor(entry, resolvePreset) {
|
|
|
2063
2086
|
return handPoseFromCurls(entry.id, entry.name, entry.curls, {
|
|
2064
2087
|
tolerance: entry.tolerance,
|
|
2065
2088
|
orientation: entry.orientation ?? void 0,
|
|
2066
|
-
hand: entry.hand ?? void 0
|
|
2089
|
+
hand: entry.hand ?? void 0,
|
|
2090
|
+
directions: entry.directions,
|
|
2091
|
+
directionToleranceDegrees: entry.directionTolerance
|
|
2067
2092
|
});
|
|
2068
2093
|
}
|
|
2069
2094
|
__name(handPoseDefinitionFor, "handPoseDefinitionFor");
|
|
@@ -2087,6 +2112,7 @@ exports.DEFAULT_INSTANCE_TRANSFORM = DEFAULT_INSTANCE_TRANSFORM;
|
|
|
2087
2112
|
exports.DEFAULT_MESH_GEOMETRY_PARAMETERS = DEFAULT_MESH_GEOMETRY_PARAMETERS;
|
|
2088
2113
|
exports.DEFAULT_PHYSICS_STATE = DEFAULT_PHYSICS_STATE;
|
|
2089
2114
|
exports.DEFAULT_POSE_CURLS = DEFAULT_POSE_CURLS;
|
|
2115
|
+
exports.DEFAULT_POSE_DIRECTIONS = DEFAULT_POSE_DIRECTIONS;
|
|
2090
2116
|
exports.DEFAULT_POSTPROCESSING_STATE = DEFAULT_POSTPROCESSING_STATE;
|
|
2091
2117
|
exports.DEFAULT_RIGIDBODY_STATE = DEFAULT_RIGIDBODY_STATE;
|
|
2092
2118
|
exports.EntityType = EntityType;
|