@vitessce/comparative 4.0.0 → 4.0.2
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/{GeometryAndMeshXR-BDALKiGu.js → GeometryAndMeshXR-TtNqh1RJ.js} +22 -22
- package/dist/{ReactNeuroglancer-DIEM_zJZ.js → ReactNeuroglancer-vRjc3Ow9.js} +4623 -4542
- package/dist/{XREnterButton-CqJBXry_.js → XREnterButton-CXX1LK9d.js} +1 -1
- package/dist/{XRSceneComponents-BI1xgf_W.js → XRSceneComponents-BjttpYE7.js} +10 -8
- package/dist/XRWrapper-Dut6jbVX.js +10 -0
- package/dist/{deflate-CLiFaG0l.js → deflate-Df2g3bU2.js} +1 -1
- package/dist/{higlass-D6CnhtOV.js → higlass-Blypk3d_.js} +1 -1
- package/dist/{index-AcW1VLoM.js → index-0awuGaBo.js} +122 -112
- package/dist/{index-D1nv5RxH.js → index-C152YJI6.js} +1 -1
- package/dist/{index-BK52HWA4.js → index-CqaxSb93.js} +73750 -73274
- package/dist/index.min.js +4 -4
- package/dist/{jpeg-Bnj3m5bk.js → jpeg-BEZQVOi8.js} +1 -1
- package/dist/{lerc-CxXz0epg.js → lerc-fhnCz5dM.js} +1 -1
- package/dist/{lzw-BAnqqsL7.js → lzw-DpAp6tQI.js} +1 -1
- package/dist/{packbits-CP79R_oC.js → packbits-D63-DMx0.js} +1 -1
- package/dist/{raw-Bt14dfGM.js → raw-BoxiLGf0.js} +1 -1
- package/dist/{webimage-DzJeAmim.js → webimage-DJPS1Ukk.js} +1 -1
- package/dist/xrStore-BqZ5T1S3.js +8 -0
- package/dist-tsc/BiomarkerSelect.js +1 -1
- package/dist-tsc/BiomarkerSelect.js.map +1 -1
- package/dist-tsc/ComparativeConfig.d.ts.map +1 -1
- package/dist-tsc/ComparativeConfig.js +2 -2
- package/dist-tsc/ComparativeConfig.js.map +1 -1
- package/dist-tsc/ControlledComparative.js +1 -1
- package/dist-tsc/ControlledComparative.js.map +1 -1
- package/package.json +12 -12
- package/src/BiomarkerSelect.jsx +1 -1
- package/src/ComparativeConfig.jsx +2 -3
- package/src/ControlledComparative.jsx +1 -1
- package/dist/XRWrapper-C5Rd9HYZ.js +0 -9
- package/dist/xrStore-BtX9iGzw.js +0 -8
|
@@ -2,16 +2,16 @@ import { jsxs as m, jsx as n } from "react/jsx-runtime";
|
|
|
2
2
|
import { useRef as r, useEffect as Pe, useState as L } from "react";
|
|
3
3
|
import { useThree as Se, useFrame as xe } from "@react-three/fiber";
|
|
4
4
|
import { Bvh as be } from "@react-three/drei";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
function
|
|
5
|
+
import { Matrix4 as Fe, Vector3 as g, Box3 as J, FrontSide as ie } from "three";
|
|
6
|
+
import { g as ye, i as Le, M as K, s as oe } from "./index-0awuGaBo.js";
|
|
7
|
+
const { useXR: we, useXRInputSourceState: se } = ye();
|
|
8
|
+
function Be(l, o) {
|
|
9
9
|
return l.get(o);
|
|
10
10
|
}
|
|
11
11
|
function H(l, o, w, P) {
|
|
12
12
|
if (!l?.inputSource?.hand)
|
|
13
13
|
return null;
|
|
14
|
-
const t =
|
|
14
|
+
const t = Be(l.inputSource.hand, o);
|
|
15
15
|
if (!t)
|
|
16
16
|
return null;
|
|
17
17
|
const i = w.getJointPose?.(t, P);
|
|
@@ -23,12 +23,12 @@ function z(l, o, w, P = 0.02) {
|
|
|
23
23
|
}
|
|
24
24
|
function De(l) {
|
|
25
25
|
const { segmentationGroup: o, segmentationSettings: w, segmentationSceneScale: P, renderingSettings: t, materialRef: i, highlightEntity: ce, setObsHighlight: M } = l, T = r(null), ae = r(null), s = r(null), f = r(null);
|
|
26
|
-
r(new
|
|
27
|
-
const B = r(null), S = r(null), E = r(0), p = r(/* @__PURE__ */ new Map()), b =
|
|
26
|
+
r(new Fe());
|
|
27
|
+
const B = r(null), S = r(null), E = r(0), p = r(/* @__PURE__ */ new Map()), b = we((e) => e.session) != null;
|
|
28
28
|
Pe(() => {
|
|
29
29
|
i?.current?.material?.uniforms?.u_physical_Pixel && (i.current.material.uniforms.u_physical_Pixel.value = b ? 0.2 : 2.5);
|
|
30
30
|
}, [b, i]);
|
|
31
|
-
const { scene: N, gl: le } = Se(), U =
|
|
31
|
+
const { scene: N, gl: le } = Se(), U = se("hand", "right"), V = se("hand", "left"), [W, k] = L(!1), [A, q] = L(!1), [ue, Q] = L(!1), [X, D] = L({
|
|
32
32
|
startPoint: new g(),
|
|
33
33
|
midPoint: new g(),
|
|
34
34
|
endPoint: new g(),
|
|
@@ -38,8 +38,8 @@ function De(l) {
|
|
|
38
38
|
Z.current = W;
|
|
39
39
|
const $ = r(A);
|
|
40
40
|
$.current = A;
|
|
41
|
-
const ee = r(
|
|
42
|
-
ee.current =
|
|
41
|
+
const ee = r(X);
|
|
42
|
+
ee.current = X;
|
|
43
43
|
const fe = r(O);
|
|
44
44
|
fe.current = O;
|
|
45
45
|
const te = r(Y);
|
|
@@ -52,7 +52,7 @@ function De(l) {
|
|
|
52
52
|
const x = N.getObjectByName("rightTipBbox"), v = N.getObjectByName("leftTipBbox");
|
|
53
53
|
if (!x || !v)
|
|
54
54
|
return;
|
|
55
|
-
const G = new
|
|
55
|
+
const G = new J().setFromObject(v), I = new J().setFromObject(x);
|
|
56
56
|
let _ = !1;
|
|
57
57
|
C((d) => d - 1), G.intersectsBox(I) && G.max.x !== -I.min.x && (k(!0), Q(!0), D({
|
|
58
58
|
startPoint: new g(),
|
|
@@ -63,14 +63,14 @@ function De(l) {
|
|
|
63
63
|
}));
|
|
64
64
|
const ge = Z.current, u = ee.current;
|
|
65
65
|
if (ge) {
|
|
66
|
-
let d = H(V, "index-finger-tip", c, a),
|
|
67
|
-
if (!d || !
|
|
66
|
+
let d = H(V, "index-finger-tip", c, a), R = H(U, "index-finger-tip", c, a);
|
|
67
|
+
if (!d || !R)
|
|
68
68
|
return;
|
|
69
|
-
s.current && (d = d.applyMatrix4(s.current.matrixWorld.clone().invert()),
|
|
70
|
-
let
|
|
71
|
-
u.setStartPoint && (
|
|
72
|
-
startPoint:
|
|
73
|
-
midPoint: new g().addVectors(
|
|
69
|
+
s.current && (d = d.applyMatrix4(s.current.matrixWorld.clone().invert()), R = R.applyMatrix4(s.current.matrixWorld.clone().invert()));
|
|
70
|
+
let j = d.clone(), y = R.clone();
|
|
71
|
+
u.setStartPoint && (j = u.startPoint), u.setEndPoint && (y = u.endPoint), D({
|
|
72
|
+
startPoint: j,
|
|
73
|
+
midPoint: new g().addVectors(j, y).multiplyScalar(0.5),
|
|
74
74
|
endPoint: y,
|
|
75
75
|
setStartPoint: u.setStartPoint,
|
|
76
76
|
setEndPoint: u.setEndPoint
|
|
@@ -83,8 +83,8 @@ function De(l) {
|
|
|
83
83
|
})), u.setStartPoint && u.setEndPoint && (de((h) => [...h, u]), Q(!1), k(!1), C(8));
|
|
84
84
|
} else if (te.current <= 0 && T.current && b) {
|
|
85
85
|
const d = T.current;
|
|
86
|
-
d.children[0].children.forEach((
|
|
87
|
-
const y = d.children[0].children[
|
|
86
|
+
d.children[0].children.forEach((R, j) => {
|
|
87
|
+
const y = d.children[0].children[j], h = new J().setFromObject(y), ne = G.intersectsBox(h), re = I.intersectsBox(h);
|
|
88
88
|
(ne || re) && (_ = !0, M(y.name), q(!0), ne && z(V, c, a) && (C(10), _ = !1), re && z(U, c, a) && (C(10), _ = !1));
|
|
89
89
|
}), !_ && $.current && (M(null), q(!1));
|
|
90
90
|
}
|
|
@@ -127,11 +127,11 @@ function De(l) {
|
|
|
127
127
|
2e-3 * t.meshScale[0],
|
|
128
128
|
2e-3 * t.meshScale[1],
|
|
129
129
|
2e-3 * t.meshScale[2]
|
|
130
|
-
], ref: i, children: [Le(t.geometrySize) && n("boxGeometry", { args: t.geometrySize }), n("shaderMaterial", { customProgramCacheKey: () => "1", side:
|
|
130
|
+
], ref: i, children: [Le(t.geometrySize) && n("boxGeometry", { args: t.geometrySize }), n("shaderMaterial", { customProgramCacheKey: () => "1", side: ie, uniforms: t.uniforms, needsUpdate: !0, transparent: !0, vertexShader: t.shader.vertexShader, fragmentShader: t.shader.fragmentShader })] }) }) : null] }), n("group", { name: "currentLine", ref: ae, children: ue ? n(K, { currentLine: X, scale: 1 / 2e-3 * 0.4 }) : null }), n("group", { name: "lines", children: O.map((e) => n(K, { currentLine: e, scale: 1 / 2e-3 * 0.4 }, oe(e))) })] }) : m("group", { children: [m("group", { children: [o?.visible ? m("group", { children: [n("hemisphereLight", { color: 8421504, groundColor: 6316128 }), n("directionalLight", { color: 16777215, position: [0, -800, 0] }), n("directionalLight", { color: 16777215, position: [0, 800, 0] }), n(be, { firstHitOnly: !0, children: n("primitive", { ref: T, object: o, position: [0, 0, 0], onClick: (e) => {
|
|
131
131
|
e.object.parent?.userData.name === "finalPass" && ce(e.object.name, e.object.userData.layerScope, e.object.userData.channelScope);
|
|
132
132
|
}, onPointerOver: (e) => {
|
|
133
133
|
M(e.object.name);
|
|
134
|
-
}, onPointerOut: () => M(null) }) })] }) : null, t.uniforms && t.shader && t.meshScale && t.geometrySize ? n("group", { children: m("mesh", { scale: t.meshScale, ref: i, children: [n("boxGeometry", { args: t.geometrySize }), n("shaderMaterial", { customProgramCacheKey: () => "1", side:
|
|
134
|
+
}, onPointerOut: () => M(null) }) })] }) : null, t.uniforms && t.shader && t.meshScale && t.geometrySize ? n("group", { children: m("mesh", { scale: t.meshScale, ref: i, children: [n("boxGeometry", { args: t.geometrySize }), n("shaderMaterial", { customProgramCacheKey: () => "1", side: ie, uniforms: t.uniforms, needsUpdate: !0, transparent: !0, vertexShader: t.shader.vertexShader, fragmentShader: t.shader.fragmentShader })] }) }) : null] }), n("group", { name: "lines", children: O.map((e) => n(K, { currentLine: e, scale: 1 }, oe(e))) })] });
|
|
135
135
|
}
|
|
136
136
|
export {
|
|
137
137
|
De as default
|