vitessce 3.9.9 → 4.0.0-test.1

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 (33) hide show
  1. package/dist/GeometryAndMeshXR-CDuFtV77.js +137 -0
  2. package/dist/OrbitControls-BrJBuUSe.js +7700 -0
  3. package/dist/{ReactNeuroglancer-B0PE_pfg.js → ReactNeuroglancer-n_mccJEi.js} +1970 -1969
  4. package/dist/XREnterButton-s3JNl4Y5.js +37 -0
  5. package/dist/XRSceneComponents-BsPxVGaX.js +48 -0
  6. package/dist/XRWrapper-B3mqy7wn.js +10 -0
  7. package/dist/{deflate-Be9Tzo_F.js → deflate-BhW_mYsS.js} +1 -1
  8. package/dist/emulate-Dy4Vqc5l.js +28295 -0
  9. package/dist/{higlass-Drd_iixN.js → higlass-moXDbnqp.js} +52945 -49808
  10. package/dist/{index-CoGvuUCw.js → index-BLeXhxTK.js} +82656 -82406
  11. package/dist/index-CRWembQ4.js +7684 -0
  12. package/dist/{index-mrZfq-JA.js → index-DWzI2Mwu.js} +190 -189
  13. package/dist/index-WPOnaDjf.js +57 -0
  14. package/dist/index.min.js +33 -32
  15. package/dist/{jpeg-BlaLkNo6.js → jpeg-BT_-26Ph.js} +14 -14
  16. package/dist/{lerc-n5GTkk5D.js → lerc-CTMmM_q8.js} +1 -1
  17. package/dist/living_room-uy_CEYZC.js +11 -0
  18. package/dist/{lzw-CqgNgHcv.js → lzw-Dg9ghyv5.js} +10 -10
  19. package/dist/meeting_room-BjXC3fLc.js +11 -0
  20. package/dist/music_room-AFchga9Y.js +11 -0
  21. package/dist/office_large-qDeoZNBo.js +11 -0
  22. package/dist/office_small-B_PLvrYC.js +11 -0
  23. package/dist/packbits-CrJ-qt3Y.js +24 -0
  24. package/dist/raw-DzihOYOe.js +9 -0
  25. package/dist/ray-grab-9OEL2ULp.js +3714 -0
  26. package/dist/{webimage-rLaU0UvY.js → webimage-CNPDR7gt.js} +1 -1
  27. package/dist/xrStore-D3c_VFug.js +10 -0
  28. package/package.json +7 -7
  29. package/dist/OrbitControls-z_0GLqk2.js +0 -6202
  30. package/dist/index-Cbn3KdIH.js +0 -6178
  31. package/dist/packbits-fWwqpH6m.js +0 -24
  32. package/dist/raw-Bdjrijly.js +0 -9
  33. package/dist/troika-three-text.esm-hSuq1e_H.js +0 -4192
@@ -0,0 +1,137 @@
1
+ import { jsxs as m, jsx as n } from "react/jsx-runtime";
2
+ import { useRef as r, useEffect as Pe, useState as L } from "react";
3
+ import { M as Se, s as ie } from "./ray-grab-9OEL2ULp.js";
4
+ import { M as xe, V as g, F as oe, a as X } from "./index-BLeXhxTK.js";
5
+ import { i as be, M as K, s as se, B as Fe } from "./index-CRWembQ4.js";
6
+ import { u as ye, a as Le } from "./OrbitControls-BrJBuUSe.js";
7
+ function Be(l, o) {
8
+ return l.get(o);
9
+ }
10
+ function H(l, o, B, P) {
11
+ if (!l?.inputSource?.hand)
12
+ return null;
13
+ const t = Be(l.inputSource.hand, o);
14
+ if (!t)
15
+ return null;
16
+ const i = B.getJointPose?.(t, P);
17
+ return i ? new g(i.transform.position.x, i.transform.position.y, i.transform.position.z) : null;
18
+ }
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);
21
+ return !t || !i ? !1 : t.distanceTo(i) < P;
22
+ }
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;
27
+ Pe(() => {
28
+ i?.current?.material?.uniforms?.u_physical_Pixel && (i.current.material.uniforms.u_physical_Pixel.value = b ? 0.2 : 2.5);
29
+ }, [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
+ startPoint: new g(),
32
+ midPoint: new g(),
33
+ endPoint: new g(),
34
+ setStartPoint: !1,
35
+ setEndPoint: !1
36
+ }), [O, de] = L([]), [Y, C] = L(0), Z = r(W);
37
+ Z.current = W;
38
+ const $ = r(A);
39
+ $.current = A;
40
+ const ee = r(J);
41
+ ee.current = J;
42
+ const fe = r(O);
43
+ fe.current = O;
44
+ const te = r(Y);
45
+ te.current = Y, Le((e, F, c) => {
46
+ if (!b || !c)
47
+ return;
48
+ const a = le.xr.getReferenceSpace();
49
+ if (!a)
50
+ return;
51
+ const x = N.getObjectByName("rightTipBbox"), v = N.getObjectByName("leftTipBbox");
52
+ if (!x || !v)
53
+ return;
54
+ const G = new X().setFromObject(v), I = new X().setFromObject(x);
55
+ let _ = !1;
56
+ C((d) => d - 1), G.intersectsBox(I) && G.max.x !== -I.min.x && (k(!0), Q(!0), D({
57
+ startPoint: new g(),
58
+ midPoint: new g(),
59
+ endPoint: new g(),
60
+ setStartPoint: !1,
61
+ setEndPoint: !1
62
+ }));
63
+ const ge = Z.current, u = ee.current;
64
+ if (ge) {
65
+ let d = H(U, "index-finger-tip", c, a), M = H(V, "index-finger-tip", c, a);
66
+ if (!d || !M)
67
+ 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),
73
+ endPoint: y,
74
+ setStartPoint: u.setStartPoint,
75
+ setEndPoint: u.setEndPoint
76
+ }), z(V, c, a) && D((h) => ({
77
+ ...h,
78
+ setEndPoint: !0
79
+ })), z(U, c, a) && D((h) => ({
80
+ ...h,
81
+ setStartPoint: !0
82
+ })), u.setStartPoint && u.setEndPoint && (de((h) => [...h, u]), Q(!1), k(!1), C(8));
83
+ } else if (te.current <= 0 && T.current && b) {
84
+ 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));
89
+ }
90
+ });
91
+ const pe = (e) => {
92
+ if (b) {
93
+ 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
+ else if (S.current === null && e.pointerId !== f.current) {
96
+ S.current = e.pointerId, p.current.set(e.pointerId, e.point.clone());
97
+ 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
+ }
100
+ }
101
+ }, 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
+ }, me = (e) => {
104
+ if (!s.current || !e.point)
105
+ return;
106
+ const F = f.current === e.pointerId, c = S.current === e.pointerId;
107
+ if (!F && !c)
108
+ return;
109
+ 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
+ const x = p.current.get(f.current), v = p.current.get(S.current);
112
+ if (x && v) {
113
+ const I = x.distanceTo(v) / E.current;
114
+ s.current.scale.copy(w.current).multiplyScalar(I);
115
+ }
116
+ } else if (F && a) {
117
+ const x = e.point.clone().sub(a);
118
+ s.current.position.add(x);
119
+ }
120
+ };
121
+ return b ? m("group", { children: [m("group", { ref: s, onPointerDown: pe, onPointerUp: he, onPointerMove: me, children: [o?.visible ? m("group", { children: [n("hemisphereLight", { color: 8421504, groundColor: 6316128 }), n("directionalLight", { color: 16777215, position: [0, -800, 0] }), n("primitive", { ref: T, object: o, position: [-0.18, 1.13, -1], scale: [
122
+ 2e-3 * P[0],
123
+ 2e-3 * P[1],
124
+ 2e-3 * P[2]
125
+ ] })] }) : null, t.uniforms && t.shader && t.meshScale ? n("group", { children: m("mesh", { name: "cube", position: [-0.18, 1.13, -1], rotation: [0, 0, 0], scale: [
126
+ 2e-3 * t.meshScale[0],
127
+ 2e-3 * t.meshScale[1],
128
+ 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
+ e.object.parent?.userData.name === "finalPass" && ce(e.object.name, e.object.userData.layerScope, e.object.userData.channelScope);
131
+ }, 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))) })] });
134
+ }
135
+ export {
136
+ Ee as default
137
+ };