@vitessce/dev 3.9.6 → 4.0.0-test.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.
- package/dist/GeometryAndMeshXR-Oj2zI_sI.js +245 -0
- package/dist/OrbitControls-5ELNF_nQ.js +11215 -0
- package/dist/{ReactNeuroglancer-5eQa4brk.js → ReactNeuroglancer-Bs7JMUO5.js} +2 -2
- package/dist/XREnterButton-CIzkyQe9.js +52 -0
- package/dist/XRSceneComponents-44cQ-EFB.js +62 -0
- package/dist/XRWrapper-CPiZ4M25.js +10 -0
- package/dist/{deflate-BlfSi-73.js → deflate-Ddy50BQC.js} +1 -1
- package/dist/emulate-CZbU4bg1.js +36969 -0
- package/dist/{higlass-Dzj0Wtv9.js → higlass-D7Nr2NjU.js} +42238 -38951
- package/dist/{troika-three-text.esm-IXbnNvXc.js → index-B_VSuhac.js} +7661 -2009
- package/dist/{index-Cz_XfJLz.js → index-C9uEW-7L.js} +2 -2
- package/dist/{index-GnGmMble.js → index-CdO3jExn.js} +5339 -4849
- package/dist/index-D3JEwl5a.js +57 -0
- package/dist/index.js +38 -38
- package/dist/{jpeg-GTyf0pdQ.js → jpeg-DQVF89G5.js} +1 -1
- package/dist/{lerc-Cxsf6swu.js → lerc-BcM7iRo4.js} +1 -1
- package/dist/living_room-DmqUeqz8.js +14 -0
- package/dist/{lzw-C4E5VmNh.js → lzw-DJUuf0zY.js} +1 -1
- package/dist/meeting_room-C6Rq8maw.js +14 -0
- package/dist/music_room-Dg5mhyYT.js +14 -0
- package/dist/office_large-ubYYC5Xo.js +14 -0
- package/dist/office_small-CWkD-Rha.js +14 -0
- package/dist/{packbits-CJAiTkd4.js → packbits-LM83yS7N.js} +1 -1
- package/dist/{raw-D9awu0AB.js → raw-CXfphBZa.js} +1 -1
- package/dist/ray-grab-CZLm2XVj.js +5607 -0
- package/dist/{webimage-Ca1vS7aF.js → webimage-DMjnadGD.js} +1 -1
- package/dist/xrStore-BXas99tA.js +10 -0
- package/package.json +5 -5
- package/dist/OrbitControls-L6I9M6QX.js +0 -18694
- package/dist/index-CsQFLn-E.js +0 -9854
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import {
|
|
4
|
+
import { g as getDefaultExportFromCjs, bu as requireAssign, bv as require_export, bw as require_core, bx as require_fails, by as require_toObject, bz as require_objectKeys, bA as require_cof, bB as require_wks, bC as require_iterators, bD as requireWeb_dom_iterable, bE as requireEs6_string_iterator, bF as require_anObject, bG as require_hide, bH as require_ctx, bI as require_toLength, bJ as require_global, bK as require_objectDp, bL as require_descriptors, bM as require_isObject, bN as require_objectCreate, bO as require_iterDefine, bP as require_iterStep, bQ as require_meta, bR as require_isArray, bS as require_iobject, bT as require_setToStringTag, bU as require_aFunction, bV as requireIterator, bW as require_propertyDesc, bX as require_root, bY as require_baseGetTag, bZ as requireIsObjectLike, b_ as requireIsObject, b$ as requireEs6_symbol, c0 as requireDefineProperty, c1 as require_toIobject, c2 as require_objectGopd, c3 as require_html, c4 as require_domCreate, c5 as require_library, c6 as requireSymbol, c7 as require_objectPie, c8 as require_has, c9 as require_redefine, ca as require_objectAssign, cb as diffCameraState, j as jsxRuntimeExports } from "./index-CdO3jExn.js";
|
|
5
5
|
import React__default from "react";
|
|
6
6
|
var assignExports = requireAssign();
|
|
7
7
|
const _Object$assign = /* @__PURE__ */ getDefaultExportFromCjs(assignExports);
|
|
@@ -3752,7 +3752,7 @@ function nextAfterFloat64(x, y) {
|
|
|
3752
3752
|
if (isNaN(x) || isNaN(y)) return NaN;
|
|
3753
3753
|
if (x === y) return y;
|
|
3754
3754
|
if (x === 0) {
|
|
3755
|
-
return y < 0 ? -
|
|
3755
|
+
return y < 0 ? -denormMin : denormMin;
|
|
3756
3756
|
}
|
|
3757
3757
|
float64Buf[0] = x;
|
|
3758
3758
|
const lowIndex = ENDIANNESS === Endianness.LITTLE ? 0 : 1;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { j as jsxRuntimeExports } from "./index-CdO3jExn.js";
|
|
2
|
+
import { useState, useEffect } from "react";
|
|
3
|
+
import { x as xrStore } from "./xrStore-BXas99tA.js";
|
|
4
|
+
function XREnterButton() {
|
|
5
|
+
const [supported, setSupported] = useState(false);
|
|
6
|
+
const [entered, setEntered] = useState(false);
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
let cancelled = false;
|
|
9
|
+
if (navigator.xr) {
|
|
10
|
+
navigator.xr.isSessionSupported("immersive-ar").then((result) => {
|
|
11
|
+
if (!cancelled)
|
|
12
|
+
setSupported(result);
|
|
13
|
+
}).catch(() => {
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return () => {
|
|
17
|
+
cancelled = true;
|
|
18
|
+
};
|
|
19
|
+
}, []);
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
const unsubscribe = xrStore.subscribe((state) => {
|
|
22
|
+
setEntered(state.session != null);
|
|
23
|
+
});
|
|
24
|
+
return unsubscribe;
|
|
25
|
+
}, []);
|
|
26
|
+
if (!supported)
|
|
27
|
+
return null;
|
|
28
|
+
const handleClick = () => {
|
|
29
|
+
if (entered) {
|
|
30
|
+
const { session } = xrStore.getState();
|
|
31
|
+
if (session)
|
|
32
|
+
session.end();
|
|
33
|
+
} else {
|
|
34
|
+
xrStore.enterAR();
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
return jsxRuntimeExports.jsx("button", { type: "button", onClick: handleClick, style: {
|
|
38
|
+
border: "1px solid white",
|
|
39
|
+
padding: "12px 24px",
|
|
40
|
+
borderRadius: "4px",
|
|
41
|
+
background: "rgba(0, 0, 0, 0.1)",
|
|
42
|
+
color: "white",
|
|
43
|
+
font: "normal 0.8125rem sans-serif",
|
|
44
|
+
outline: "none",
|
|
45
|
+
cursor: "pointer",
|
|
46
|
+
zIndex: 1,
|
|
47
|
+
position: "absolute"
|
|
48
|
+
}, children: entered ? "Exit AR" : "Enter AR" });
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
XREnterButton as default
|
|
52
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { j as jsxRuntimeExports } from "./index-CdO3jExn.js";
|
|
2
|
+
import { useRef } from "react";
|
|
3
|
+
import { s as useXRInputSourceState, M as useXR } from "./ray-grab-CZLm2XVj.js";
|
|
4
|
+
import { u as useThree, a as useFrame } from "./OrbitControls-5ELNF_nQ.js";
|
|
5
|
+
function getHandJoint(hand, jointName) {
|
|
6
|
+
return hand.get(jointName);
|
|
7
|
+
}
|
|
8
|
+
function HandBbox() {
|
|
9
|
+
const rightHand = useXRInputSourceState("hand", "right");
|
|
10
|
+
const leftHand = useXRInputSourceState("hand", "left");
|
|
11
|
+
const rightTipRef = useRef(null);
|
|
12
|
+
const leftTipRef = useRef(null);
|
|
13
|
+
const { gl } = useThree();
|
|
14
|
+
useFrame((_state, _delta, frame) => {
|
|
15
|
+
if (!frame || !gl.xr.isPresenting)
|
|
16
|
+
return;
|
|
17
|
+
const refSpace = gl.xr.getReferenceSpace();
|
|
18
|
+
if (!refSpace)
|
|
19
|
+
return;
|
|
20
|
+
if (rightHand?.inputSource?.hand && rightTipRef.current) {
|
|
21
|
+
const jointSpace = getHandJoint(rightHand.inputSource.hand, "index-finger-tip");
|
|
22
|
+
if (jointSpace) {
|
|
23
|
+
const pose = frame.getJointPose?.(jointSpace, refSpace);
|
|
24
|
+
if (pose) {
|
|
25
|
+
rightTipRef.current.position.set(pose.transform.position.x, pose.transform.position.y, pose.transform.position.z);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
if (leftHand?.inputSource?.hand && leftTipRef.current) {
|
|
30
|
+
const jointSpace = getHandJoint(leftHand.inputSource.hand, "index-finger-tip");
|
|
31
|
+
if (jointSpace) {
|
|
32
|
+
const pose = frame.getJointPose?.(jointSpace, refSpace);
|
|
33
|
+
if (pose) {
|
|
34
|
+
leftTipRef.current.position.set(pose.transform.position.x, pose.transform.position.y, pose.transform.position.z);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsxs("mesh", { name: "leftTipBbox", ref: leftTipRef, children: [jsxRuntimeExports.jsx("boxGeometry", { args: [0.02, 0.02, 0.02] }), jsxRuntimeExports.jsx("meshStandardMaterial", { color: "blue", transparent: true, opacity: 0 })] }), jsxRuntimeExports.jsxs("mesh", { name: "rightTipBbox", ref: rightTipRef, children: [jsxRuntimeExports.jsx("boxGeometry", { args: [0.02, 0.02, 0.02] }), jsxRuntimeExports.jsx("meshStandardMaterial", { color: "orange", transparent: true, opacity: 0 })] })] });
|
|
40
|
+
}
|
|
41
|
+
function HandDecorate() {
|
|
42
|
+
const session = useXR((state) => state.session);
|
|
43
|
+
const { scene } = useThree();
|
|
44
|
+
useFrame(() => {
|
|
45
|
+
if (!session)
|
|
46
|
+
return;
|
|
47
|
+
scene.traverse((child) => {
|
|
48
|
+
if (child.isMesh && child.material && child.userData?.xpiHand) {
|
|
49
|
+
const mesh = child;
|
|
50
|
+
mesh.material.transparent = true;
|
|
51
|
+
mesh.material.opacity = 0.5;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
function XRSceneComponents() {
|
|
58
|
+
return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(HandBbox, {}), jsxRuntimeExports.jsx(HandDecorate, {})] });
|
|
59
|
+
}
|
|
60
|
+
export {
|
|
61
|
+
XRSceneComponents as default
|
|
62
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { j as jsxRuntimeExports } from "./index-CdO3jExn.js";
|
|
2
|
+
import { K as XR } from "./ray-grab-CZLm2XVj.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { x as xrStore } from "./xrStore-BXas99tA.js";
|
|
5
|
+
function XRWrapper({ children }) {
|
|
6
|
+
return jsxRuntimeExports.jsx(XR, { store: xrStore, children });
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
XRWrapper as default
|
|
10
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-SxljTded.js";
|
|
2
|
-
import {
|
|
2
|
+
import { B as BaseDecoder } from "./index-CdO3jExn.js";
|
|
3
3
|
class DeflateDecoder extends BaseDecoder {
|
|
4
4
|
decodeBlock(buffer) {
|
|
5
5
|
return inflate_1(new Uint8Array(buffer)).buffer;
|