@vitessce/comparative 4.0.0-test.2 → 4.0.0

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 (45) hide show
  1. package/dist/{GeometryAndMeshXR-Rj8DuqKI.js → GeometryAndMeshXR-BDALKiGu.js} +39 -38
  2. package/dist/{ReactNeuroglancer-BAmwPpri.js → ReactNeuroglancer-DIEM_zJZ.js} +1 -1
  3. package/dist/{XREnterButton-BTyk-JNM.js → XREnterButton-CqJBXry_.js} +1 -1
  4. package/dist/{XRSceneComponents-Bdj5nq7u.js → XRSceneComponents-BI1xgf_W.js} +4 -4
  5. package/dist/XRWrapper-C5Rd9HYZ.js +9 -0
  6. package/dist/{deflate-CrBkHn3o.js → deflate-CLiFaG0l.js} +1 -1
  7. package/dist/{higlass-R4akpd_U.js → higlass-D6CnhtOV.js} +1 -1
  8. package/dist/index-AcW1VLoM.js +999 -0
  9. package/dist/{index-ChP-N2-Q.js → index-BK52HWA4.js} +109900 -133159
  10. package/dist/{index-CaGs2wGk.js → index-D1nv5RxH.js} +160 -157
  11. package/dist/index.min.js +32 -31
  12. package/dist/{jpeg-CmFz2x7u.js → jpeg-Bnj3m5bk.js} +1 -1
  13. package/dist/{lerc-D9Z1SChC.js → lerc-CxXz0epg.js} +1 -1
  14. package/dist/{lzw-BxcPIsd9.js → lzw-BAnqqsL7.js} +1 -1
  15. package/dist/{packbits-BvyhLVrx.js → packbits-CP79R_oC.js} +1 -1
  16. package/dist/{raw-nQNg2593.js → raw-Bt14dfGM.js} +1 -1
  17. package/dist/{webimage-CD0PiPO_.js → webimage-DzJeAmim.js} +1 -1
  18. package/dist/xrStore-BtX9iGzw.js +8 -0
  19. package/dist-tsc/BiomarkerSelect.js +2 -1
  20. package/dist-tsc/BiomarkerSelect.js.map +1 -0
  21. package/dist-tsc/ComparativeConfig.d.ts.map +1 -1
  22. package/dist-tsc/ComparativeConfig.js +41 -8
  23. package/dist-tsc/ComparativeConfig.js.map +1 -0
  24. package/dist-tsc/ControlledComparative.js +2 -1
  25. package/dist-tsc/ControlledComparative.js.map +1 -0
  26. package/dist-tsc/UncontrolledComparative.js +1 -0
  27. package/dist-tsc/UncontrolledComparative.js.map +1 -0
  28. package/dist-tsc/index.js +1 -0
  29. package/dist-tsc/index.js.map +1 -0
  30. package/package.json +31 -13
  31. package/src/BiomarkerSelect.jsx +1 -1
  32. package/src/ComparativeConfig.jsx +40 -8
  33. package/src/ControlledComparative.jsx +1 -1
  34. package/dist/OrbitControls-CSK4x9Nb.js +0 -7700
  35. package/dist/XRWrapper-C_ChUWmZ.js +0 -10
  36. package/dist/emulate-BMuLpa2M.js +0 -28295
  37. package/dist/index-BvABCvu0.js +0 -7737
  38. package/dist/index-evkxJwCU.js +0 -57
  39. package/dist/living_room-uy_CEYZC.js +0 -11
  40. package/dist/meeting_room-BjXC3fLc.js +0 -11
  41. package/dist/music_room-AFchga9Y.js +0 -11
  42. package/dist/office_large-qDeoZNBo.js +0 -11
  43. package/dist/office_small-B_PLvrYC.js +0 -11
  44. package/dist/ray-grab-CunbRXU8.js +0 -3714
  45. package/dist/xrStore-BFuIULKr.js +0 -10
@@ -1,33 +1,34 @@
1
1
  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
- import { M as Se, s as ie } from "./ray-grab-CunbRXU8.js";
4
- import { M as xe, V as g, F as oe, a as X } from "./index-ChP-N2-Q.js";
5
- import { i as be, M as K, s as se, B as Fe } from "./index-BvABCvu0.js";
6
- import { u as ye, a as Le } from "./OrbitControls-CSK4x9Nb.js";
7
- function Be(l, o) {
3
+ import { useThree as Se, useFrame as xe } from "@react-three/fiber";
4
+ import { Bvh as be } from "@react-three/drei";
5
+ import { useXR as Fe, useXRInputSourceState as ie } from "@react-three/xr";
6
+ import { Matrix4 as ye, Vector3 as g, Box3 as X, FrontSide as oe } from "three";
7
+ import { i as Le, M as K, s as se } from "./index-AcW1VLoM.js";
8
+ function we(l, o) {
8
9
  return l.get(o);
9
10
  }
10
- function H(l, o, B, P) {
11
+ function H(l, o, w, P) {
11
12
  if (!l?.inputSource?.hand)
12
13
  return null;
13
- const t = Be(l.inputSource.hand, o);
14
+ const t = we(l.inputSource.hand, o);
14
15
  if (!t)
15
16
  return null;
16
- const i = B.getJointPose?.(t, P);
17
+ const i = w.getJointPose?.(t, P);
17
18
  return i ? new g(i.transform.position.x, i.transform.position.y, i.transform.position.z) : null;
18
19
  }
19
- function z(l, o, B, P = 0.02) {
20
- const t = H(l, "thumb-tip", o, B), i = H(l, "index-finger-tip", o, B);
20
+ function z(l, o, w, P = 0.02) {
21
+ const t = H(l, "thumb-tip", o, w), i = H(l, "index-finger-tip", o, w);
21
22
  return !t || !i ? !1 : t.distanceTo(i) < P;
22
23
  }
23
- function Ee(l) {
24
- const { segmentationGroup: o, segmentationSettings: B, segmentationSceneScale: P, renderingSettings: t, materialRef: i, highlightEntity: ce, setObsHighlight: R } = l, T = r(null), ae = r(null), s = r(null), f = r(null);
25
- r(new xe());
26
- const w = r(null), S = r(null), E = r(0), p = r(/* @__PURE__ */ new Map()), b = Se((e) => e.session) != null;
24
+ function De(l) {
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 ye());
27
+ const B = r(null), S = r(null), E = r(0), p = r(/* @__PURE__ */ new Map()), b = Fe((e) => e.session) != null;
27
28
  Pe(() => {
28
29
  i?.current?.material?.uniforms?.u_physical_Pixel && (i.current.material.uniforms.u_physical_Pixel.value = b ? 0.2 : 2.5);
29
30
  }, [b, i]);
30
- const { scene: N, gl: le } = ye(), V = ie("hand", "right"), U = ie("hand", "left"), [W, k] = L(!1), [A, q] = L(!1), [ue, Q] = L(!1), [J, D] = L({
31
+ const { scene: N, gl: le } = Se(), U = ie("hand", "right"), V = ie("hand", "left"), [W, k] = L(!1), [A, q] = L(!1), [ue, Q] = L(!1), [J, D] = L({
31
32
  startPoint: new g(),
32
33
  midPoint: new g(),
33
34
  endPoint: new g(),
@@ -42,7 +43,7 @@ function Ee(l) {
42
43
  const fe = r(O);
43
44
  fe.current = O;
44
45
  const te = r(Y);
45
- te.current = Y, Le((e, F, c) => {
46
+ te.current = Y, xe((e, F, c) => {
46
47
  if (!b || !c)
47
48
  return;
48
49
  const a = le.xr.getReferenceSpace();
@@ -62,44 +63,44 @@ function Ee(l) {
62
63
  }));
63
64
  const ge = Z.current, u = ee.current;
64
65
  if (ge) {
65
- let d = H(U, "index-finger-tip", c, a), M = H(V, "index-finger-tip", c, a);
66
- if (!d || !M)
66
+ let d = H(V, "index-finger-tip", c, a), j = H(U, "index-finger-tip", c, a);
67
+ if (!d || !j)
67
68
  return;
68
- s.current && (d = d.applyMatrix4(s.current.matrixWorld.clone().invert()), M = M.applyMatrix4(s.current.matrixWorld.clone().invert()));
69
- let j = d.clone(), y = M.clone();
70
- u.setStartPoint && (j = u.startPoint), u.setEndPoint && (y = u.endPoint), D({
71
- startPoint: j,
72
- midPoint: new g().addVectors(j, y).multiplyScalar(0.5),
69
+ s.current && (d = d.applyMatrix4(s.current.matrixWorld.clone().invert()), j = j.applyMatrix4(s.current.matrixWorld.clone().invert()));
70
+ let R = d.clone(), y = j.clone();
71
+ u.setStartPoint && (R = u.startPoint), u.setEndPoint && (y = u.endPoint), D({
72
+ startPoint: R,
73
+ midPoint: new g().addVectors(R, y).multiplyScalar(0.5),
73
74
  endPoint: y,
74
75
  setStartPoint: u.setStartPoint,
75
76
  setEndPoint: u.setEndPoint
76
- }), z(V, c, a) && D((h) => ({
77
+ }), z(U, c, a) && D((h) => ({
77
78
  ...h,
78
79
  setEndPoint: !0
79
- })), z(U, c, a) && D((h) => ({
80
+ })), z(V, c, a) && D((h) => ({
80
81
  ...h,
81
82
  setStartPoint: !0
82
83
  })), u.setStartPoint && u.setEndPoint && (de((h) => [...h, u]), Q(!1), k(!1), C(8));
83
84
  } else if (te.current <= 0 && T.current && b) {
84
85
  const d = T.current;
85
- d.children[0].children.forEach((M, j) => {
86
- const y = d.children[0].children[j], h = new X().setFromObject(y), ne = G.intersectsBox(h), re = I.intersectsBox(h);
87
- (ne || re) && (_ = !0, R(y.name), q(!0), ne && z(U, c, a) && (C(10), _ = !1), re && z(V, c, a) && (C(10), _ = !1));
88
- }), !_ && $.current && (R(null), q(!1));
86
+ d.children[0].children.forEach((j, R) => {
87
+ const y = d.children[0].children[R], h = new X().setFromObject(y), ne = G.intersectsBox(h), re = I.intersectsBox(h);
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
+ }), !_ && $.current && (M(null), q(!1));
89
90
  }
90
91
  });
91
92
  const pe = (e) => {
92
93
  if (b) {
93
94
  if (e.stopPropagation(), e.target.setPointerCapture(e.pointerId), f.current === null)
94
- f.current = e.pointerId, p.current.set(e.pointerId, e.point.clone()), s.current && (w.current = s.current.scale.clone());
95
+ f.current = e.pointerId, p.current.set(e.pointerId, e.point.clone()), s.current && (B.current = s.current.scale.clone());
95
96
  else if (S.current === null && e.pointerId !== f.current) {
96
97
  S.current = e.pointerId, p.current.set(e.pointerId, e.point.clone());
97
98
  const F = p.current.get(f.current), c = e.point;
98
- F && (E.current = F.distanceTo(c)), s.current && (w.current = s.current.scale.clone());
99
+ F && (E.current = F.distanceTo(c)), s.current && (B.current = s.current.scale.clone());
99
100
  }
100
101
  }
101
102
  }, he = (e) => {
102
- e.target.releasePointerCapture(e.pointerId), p.current.delete(e.pointerId), f.current === e.pointerId && (f.current = null, w.current = null), S.current === e.pointerId && (S.current = null, E.current = 0);
103
+ e.target.releasePointerCapture(e.pointerId), p.current.delete(e.pointerId), f.current === e.pointerId && (f.current = null, B.current = null), S.current === e.pointerId && (S.current = null, E.current = 0);
103
104
  }, me = (e) => {
104
105
  if (!s.current || !e.point)
105
106
  return;
@@ -107,11 +108,11 @@ function Ee(l) {
107
108
  if (!F && !c)
108
109
  return;
109
110
  const a = p.current.get(e.pointerId);
110
- if (p.current.set(e.pointerId, e.point.clone()), S.current !== null && E.current > 0 && w.current) {
111
+ if (p.current.set(e.pointerId, e.point.clone()), S.current !== null && E.current > 0 && B.current) {
111
112
  const x = p.current.get(f.current), v = p.current.get(S.current);
112
113
  if (x && v) {
113
114
  const I = x.distanceTo(v) / E.current;
114
- s.current.scale.copy(w.current).multiplyScalar(I);
115
+ s.current.scale.copy(B.current).multiplyScalar(I);
115
116
  }
116
117
  } else if (F && a) {
117
118
  const x = e.point.clone().sub(a);
@@ -126,12 +127,12 @@ function Ee(l) {
126
127
  2e-3 * t.meshScale[0],
127
128
  2e-3 * t.meshScale[1],
128
129
  2e-3 * t.meshScale[2]
129
- ], ref: i, children: [be(t.geometrySize) && n("boxGeometry", { args: t.geometrySize }), n("shaderMaterial", { customProgramCacheKey: () => "1", side: oe, 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: J, 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 }, se(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(Fe, { firstHitOnly: !0, children: n("primitive", { ref: T, object: o, position: [0, 0, 0], onClick: (e) => {
130
+ ], ref: i, children: [Le(t.geometrySize) && n("boxGeometry", { args: t.geometrySize }), n("shaderMaterial", { customProgramCacheKey: () => "1", side: oe, 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: J, 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 }, se(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) => {
130
131
  e.object.parent?.userData.name === "finalPass" && ce(e.object.name, e.object.userData.layerScope, e.object.userData.channelScope);
131
132
  }, onPointerOver: (e) => {
132
- R(e.object.name);
133
- }, onPointerOut: () => R(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: oe, 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 }, se(e))) })] });
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: oe, 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 }, se(e))) })] });
134
135
  }
135
136
  export {
136
- Ee as default
137
+ De as default
137
138
  };
@@ -3,7 +3,7 @@ var p_ = (i, e, t) => e in i ? f_(i, e, { enumerable: !0, configurable: !0, writ
3
3
  var Qn = (i, e, t) => p_(i, typeof e != "symbol" ? e + "" : e, t);
4
4
  import { jsx as g_, jsxs as m_ } from "react/jsx-runtime";
5
5
  import Hb from "react";
6
- import { g as Qe, bs as v_, bt as Ot, bu as ut, bv as Hv, bw as qv, bx as $k, by as jv, bz as Nr, bA as Jv, bB as aa, bC as Ro, bD as Ao, bE as Gk, bF as oa, bG as qu, bH as Or, bI as ju, bJ as Ju, bK as xs, bL as y_, bM as S_, bN as b_, bO as Ku, bP as w_, bQ as C_, bR as Wk, bS as Yu, bT as x_, bU as E_, bV as k_, bW as T_, bX as L_, bY as Kv, bZ as Hk, b_ as D_, b$ as Yv, c0 as I_, c1 as P_, c2 as R_, c3 as A_, c4 as __, c5 as M_, c6 as N_, c7 as O_, c8 as V_, c9 as B_ } from "./index-ChP-N2-Q.js";
6
+ import { b as Qe, r as v_, h as Ot, j as ut, k as Hv, m as qv, n as $k, o as jv, p as Nr, q as Jv, s as aa, t as Ro, v as Ao, w as Gk, x as oa, y as qu, z as Or, A as ju, D as Ju, E as xs, F as y_, G as S_, H as b_, I as Ku, J as w_, K as C_, M as Wk, N as Yu, O as x_, P as E_, Q as k_, R as T_, S as L_, T as Kv, U as Hk, V as D_, W as Yv, X as I_, Y as P_, Z as R_, _ as A_, $ as __, a0 as M_, a1 as N_, a2 as O_, a3 as V_, a4 as B_ } from "./index-BK52HWA4.js";
7
7
  var F_ = v_();
8
8
  const H = /* @__PURE__ */ Qe(F_);
9
9
  var qb = {}, Nf, jb;
@@ -1,6 +1,6 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  import { useState as s, useEffect as o } from "react";
3
- import { x as r } from "./xrStore-BFuIULKr.js";
3
+ import { x as r } from "./xrStore-BtX9iGzw.js";
4
4
  function b() {
5
5
  const [i, u] = s(!1), [n, a] = s(!1);
6
6
  return o(() => {
@@ -1,7 +1,7 @@
1
1
  import { jsxs as a, Fragment as d, jsx as i } from "react/jsx-runtime";
2
2
  import { useRef as f } from "react";
3
- import { s as m, M as x } from "./ray-grab-CunbRXU8.js";
4
- import { u as h, a as g } from "./OrbitControls-CSK4x9Nb.js";
3
+ import { useXRInputSourceState as m, useXR as x } from "@react-three/xr";
4
+ import { useThree as h, useFrame as g } from "@react-three/fiber";
5
5
  function l(n, r) {
6
6
  return n.get(r);
7
7
  }
@@ -40,9 +40,9 @@ function y() {
40
40
  });
41
41
  }), null;
42
42
  }
43
- function B() {
43
+ function J() {
44
44
  return a(d, { children: [i(S, {}), i(y, {})] });
45
45
  }
46
46
  export {
47
- B as default
47
+ J as default
48
48
  };
@@ -0,0 +1,9 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { XR as t } from "@react-three/xr";
3
+ import { x as e } from "./xrStore-BtX9iGzw.js";
4
+ function i({ children: r }) {
5
+ return o(t, { store: e, children: r });
6
+ }
7
+ export {
8
+ i as default
9
+ };
@@ -1,5 +1,5 @@
1
1
  import { i as r } from "./pako.esm-D68R8YXe.js";
2
- import { B as a } from "./index-ChP-N2-Q.js";
2
+ import { B as a } from "./index-BK52HWA4.js";
3
3
  class s extends a {
4
4
  decodeBlock(e) {
5
5
  return r(new Uint8Array(e)).buffer;
@@ -1,6 +1,6 @@
1
1
  import * as KY from "react";
2
2
  import I, { createContext as op, isValidElement as ZY, PureComponent as ap, Component as sp, useMemo as Zt, useState as Ur, useRef as Mt, useEffect as ar, useCallback as zt, memo as QY, useContext as nl, useReducer as JY, useLayoutEffect as eK } from "react";
3
- import { g as PB, a4 as e4, a5 as qO } from "./index-ChP-N2-Q.js";
3
+ import { b as PB, e as e4, f as qO } from "./index-BK52HWA4.js";
4
4
  import ga, { unstable_batchedUpdates as Yp, createPortal as tK } from "react-dom";
5
5
  import { jsx as Ic, jsxs as rK } from "react/jsx-runtime";
6
6
  function nK(t) {