@vitessce/all 4.0.0-test.3 → 4.0.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.
- package/dist/{GeometryAndMeshXR-BRP24ura.js → GeometryAndMeshXR-o1KV1S6m.js} +2 -2
- package/dist/{ReactNeuroglancer-VYcAJw_c.js → ReactNeuroglancer-BuXB_Emb.js} +1 -1
- package/dist/{XREnterButton-vmEhdF4L.js → XREnterButton-DZUdn-IL.js} +1 -1
- package/dist/{XRSceneComponents-DnZLSAJz.js → XRSceneComponents-Cgrg-9p2.js} +3 -1
- package/dist/{XRWrapper-C94X82Mb.js → XRWrapper-BB28re-M.js} +3 -2
- package/dist/{deflate-B35gUGrI.js → deflate-E8TfyvM7.js} +1 -1
- package/dist/{higlass-DIGh19X3.js → higlass-CGhpbMxK.js} +1 -1
- package/dist/{index-CIJWVuYa.js → index-0nuepTVk.js} +18 -6
- package/dist/{index-BRdVNpUK.js → index-BHE3zASA.js} +7 -6
- package/dist/{index-DLzCt39t.js → index-moreUHDf.js} +447 -220
- package/dist/index.js +1 -1
- package/dist/{jpeg-pIveo5qm.js → jpeg-_87xUwY6.js} +1 -1
- package/dist/{lerc-DEzmYyQ_.js → lerc-DFl9HcRa.js} +1 -1
- package/dist/{lzw-lK2xDQPh.js → lzw-hla-j59h.js} +1 -1
- package/dist/{packbits-Ds8BMewq.js → packbits-C8umOnfG.js} +1 -1
- package/dist/{raw-BKulPvK3.js → raw-BLQKlp_4.js} +1 -1
- package/dist/{webimage-BnK9oxcF.js → webimage-nk5eMN68.js} +1 -1
- package/dist/xrStore-gGt4Wkvz.js +8 -0
- package/dist-tsc/Vitessce.js +1 -0
- package/dist-tsc/Vitessce.js.map +1 -0
- package/dist-tsc/base-plugins.d.ts +1 -1
- package/dist-tsc/base-plugins.d.ts.map +1 -1
- package/dist-tsc/base-plugins.js +3 -0
- package/dist-tsc/base-plugins.js.map +1 -0
- package/dist-tsc/index.js +1 -0
- package/dist-tsc/index.js.map +1 -0
- package/dist-tsc/joint-file-types-legacy.js +1 -0
- package/dist-tsc/joint-file-types-legacy.js.map +1 -0
- package/dist-tsc/joint-file-types-legacy.test.js +1 -0
- package/dist-tsc/joint-file-types-legacy.test.js.map +1 -0
- package/dist-tsc/joint-file-types.js +1 -0
- package/dist-tsc/joint-file-types.js.map +1 -0
- package/dist-tsc/joint-file-types.test.js +1 -0
- package/dist-tsc/joint-file-types.test.js.map +1 -0
- package/dist-tsc/latest-config-schema.test.js +1 -0
- package/dist-tsc/latest-config-schema.test.js.map +1 -0
- package/package.json +34 -34
- package/src/base-plugins.ts +2 -0
- package/dist/xrStore-BymedRtx.js +0 -8
|
@@ -2,9 +2,9 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useRef, useEffect, useState } from "react";
|
|
3
3
|
import { useThree, useFrame } from "@react-three/fiber";
|
|
4
4
|
import { Bvh } from "@react-three/drei";
|
|
5
|
-
import { useXR, useXRInputSourceState } from "@react-three/xr";
|
|
6
5
|
import { Matrix4, Vector3, Box3, FrontSide } from "three";
|
|
7
|
-
import { i as isValidGeometrySize, M as MeasureLine, s as stringifyLineData } from "./index-
|
|
6
|
+
import { g as getXRModule, i as isValidGeometrySize, M as MeasureLine, s as stringifyLineData } from "./index-0nuepTVk.js";
|
|
7
|
+
const { useXR, useXRInputSourceState } = getXRModule();
|
|
8
8
|
function getHandJoint(hand, jointName) {
|
|
9
9
|
return hand.get(jointName);
|
|
10
10
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React__default from "react";
|
|
3
|
-
import { a as getDefaultExportFromCjs, d as requireAssign, f as require_export, h as require_core, j as require_fails, k as require_toObject, m as require_objectKeys, n as require_cof, o as require_wks, p as require_iterators, q as requireWeb_dom_iterable, s as requireEs6_string_iterator, t as require_anObject, v as require_hide, w as require_ctx, x as require_toLength, y as require_global, z as require_objectDp, A as require_descriptors, D as require_isObject, E as require_objectCreate, F as require_iterDefine, G as require_iterStep, H as require_meta, I as require_isArray, J as require_iobject, K as require_setToStringTag, M as require_aFunction, N as requireIterator, O as require_propertyDesc, c as commonjsGlobal, P as requireEs6_symbol, Q as requireDefineProperty, R as require_toIobject, S as require_objectGopd, T as require_html, U as require_domCreate, V as require_library, W as requireSymbol, X as require_objectPie, Y as require_has, Z as require_redefine, _ as require_objectAssign, $ as diffCameraState } from "./index-
|
|
3
|
+
import { a as getDefaultExportFromCjs, d as requireAssign, f as require_export, h as require_core, j as require_fails, k as require_toObject, m as require_objectKeys, n as require_cof, o as require_wks, p as require_iterators, q as requireWeb_dom_iterable, s as requireEs6_string_iterator, t as require_anObject, v as require_hide, w as require_ctx, x as require_toLength, y as require_global, z as require_objectDp, A as require_descriptors, D as require_isObject, E as require_objectCreate, F as require_iterDefine, G as require_iterStep, H as require_meta, I as require_isArray, J as require_iobject, K as require_setToStringTag, M as require_aFunction, N as requireIterator, O as require_propertyDesc, c as commonjsGlobal, P as requireEs6_symbol, Q as requireDefineProperty, R as require_toIobject, S as require_objectGopd, T as require_html, U as require_domCreate, V as require_library, W as requireSymbol, X as require_objectPie, Y as require_has, Z as require_redefine, _ as require_objectAssign, $ as diffCameraState } from "./index-moreUHDf.js";
|
|
4
4
|
var assignExports = requireAssign();
|
|
5
5
|
const _Object$assign = /* @__PURE__ */ getDefaultExportFromCjs(assignExports);
|
|
6
6
|
var es6_object_keys = {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useEffect } from "react";
|
|
3
|
-
import { x as xrStore } from "./xrStore-
|
|
3
|
+
import { x as xrStore } from "./xrStore-gGt4Wkvz.js";
|
|
4
4
|
function XREnterButton() {
|
|
5
5
|
const [supported, setSupported] = useState(false);
|
|
6
6
|
const [entered, setEntered] = useState(false);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useRef } from "react";
|
|
3
|
-
import { useXRInputSourceState, useXR } from "@react-three/xr";
|
|
4
3
|
import { useThree, useFrame } from "@react-three/fiber";
|
|
4
|
+
import { g as getXRModule } from "./index-0nuepTVk.js";
|
|
5
|
+
const { useXRInputSourceState } = getXRModule();
|
|
5
6
|
function getHandJoint(hand, jointName) {
|
|
6
7
|
return hand.get(jointName);
|
|
7
8
|
}
|
|
@@ -38,6 +39,7 @@ function HandBbox() {
|
|
|
38
39
|
});
|
|
39
40
|
return jsxs(Fragment, { children: [jsxs("mesh", { name: "leftTipBbox", ref: leftTipRef, children: [jsx("boxGeometry", { args: [0.02, 0.02, 0.02] }), jsx("meshStandardMaterial", { color: "blue", transparent: true, opacity: 0 })] }), jsxs("mesh", { name: "rightTipBbox", ref: rightTipRef, children: [jsx("boxGeometry", { args: [0.02, 0.02, 0.02] }), jsx("meshStandardMaterial", { color: "orange", transparent: true, opacity: 0 })] })] });
|
|
40
41
|
}
|
|
42
|
+
const { useXR } = getXRModule();
|
|
41
43
|
function HandDecorate() {
|
|
42
44
|
const session = useXR((state) => state.session);
|
|
43
45
|
const { scene } = useThree();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { x as xrStore } from "./xrStore-
|
|
2
|
+
import { g as getXRModule } from "./index-0nuepTVk.js";
|
|
3
|
+
import { x as xrStore } from "./xrStore-gGt4Wkvz.js";
|
|
4
|
+
const { XR } = getXRModule();
|
|
4
5
|
function XRWrapper({ children }) {
|
|
5
6
|
return jsx(XR, { store: xrStore, children });
|
|
6
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-SxljTded.js";
|
|
2
|
-
import { B as BaseDecoder } from "./index-
|
|
2
|
+
import { B as BaseDecoder } from "./index-moreUHDf.js";
|
|
3
3
|
class DeflateDecoder extends BaseDecoder {
|
|
4
4
|
decodeBlock(buffer) {
|
|
5
5
|
return inflate_1(new Uint8Array(buffer)).buffer;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import React__default, { createContext, isValidElement, PureComponent, Component, useMemo, useState, useRef, useEffect, useCallback, memo, useContext, useReducer, useLayoutEffect } from "react";
|
|
3
|
-
import { r as requireObjectAssign, a as getDefaultExportFromCjs$1, c as commonjsGlobal, e as earcut } from "./index-
|
|
3
|
+
import { r as requireObjectAssign, a as getDefaultExportFromCjs$1, c as commonjsGlobal, e as earcut } from "./index-moreUHDf.js";
|
|
4
4
|
import ReactDOM__default, { unstable_batchedUpdates, createPortal } from "react-dom";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
function finallyConstructor(callback) {
|
|
@@ -3,7 +3,7 @@ import React__default, { useRef, useState, useEffect, Suspense, forwardRef } fro
|
|
|
3
3
|
import { Canvas } from "@react-three/fiber";
|
|
4
4
|
import { Center, Text, Line, Bvh, OrbitControls } from "@react-three/drei";
|
|
5
5
|
import { Matrix3, Matrix4, Vector3, Vector2, UniformsUtils, Data3DTexture, RedFormat, FloatType, LinearFilter, FrontSide, Scene, Group, MeshPhysicalMaterial, MeshBasicMaterial, MeshStandardMaterial, BackSide } from "three";
|
|
6
|
-
import { C as CoordinationType, g as getImageSize } from "./index-
|
|
6
|
+
import { C as CoordinationType, g as getImageSize } from "./index-moreUHDf.js";
|
|
7
7
|
function MeasureLine({ currentLine, scale }) {
|
|
8
8
|
const textRef = useRef(null);
|
|
9
9
|
return jsxs("group", { children: [jsx(Center, { bottom: true, right: true, position: [currentLine.midPoint.x, currentLine.midPoint.y, currentLine.midPoint.z], rotation: [0, 0, 0], children: jsx(Text, { color: "gray", scale: 0.05, ref: textRef, children: `${(currentLine.startPoint.distanceTo(currentLine.endPoint) * scale).toFixed(2)} µm` }) }), jsx(Line, {
|
|
@@ -944,8 +944,8 @@ function GeometryAndMesh(props) {
|
|
|
944
944
|
setObsHighlight(e.object.name);
|
|
945
945
|
}, onPointerOut: () => setObsHighlight(null) }) })] }) : null, renderingSettings.uniforms && renderingSettings.shader && renderingSettings.meshScale && renderingSettings.geometrySize ? jsx("group", { children: jsxs("mesh", { scale: renderingSettings.meshScale, ref: materialRef, children: [jsx("boxGeometry", { args: renderingSettings.geometrySize }), jsx("shaderMaterial", { customProgramCacheKey: () => "1", side: FrontSide, uniforms: renderingSettings.uniforms, needsUpdate: true, transparent: true, vertexShader: renderingSettings.shader.vertexShader, fragmentShader: renderingSettings.shader.fragmentShader })] }) }) : null] }), jsx("group", { name: "lines", children: lines.map((object) => jsx(MeasureLine, { currentLine: object, scale: 1 }, stringifyLineData(object))) })] });
|
|
946
946
|
}
|
|
947
|
-
const LazyGeometryAndMeshXR = React__default.lazy(() => import("./GeometryAndMeshXR-
|
|
948
|
-
const LazyXRSceneComponents = React__default.lazy(() => import("./XRSceneComponents-
|
|
947
|
+
const LazyGeometryAndMeshXR = React__default.lazy(() => import("./GeometryAndMeshXR-o1KV1S6m.js").catch(() => ({ default: GeometryAndMesh })));
|
|
948
|
+
const LazyXRSceneComponents = React__default.lazy(() => import("./XRSceneComponents-Cgrg-9p2.js").catch(() => ({ default: () => null })));
|
|
949
949
|
function SpatialThree(props) {
|
|
950
950
|
const materialRef = useRef(null);
|
|
951
951
|
const orbitRef = useRef(null);
|
|
@@ -1289,22 +1289,33 @@ function SpatialThree(props) {
|
|
|
1289
1289
|
const { xrEnabled } = props;
|
|
1290
1290
|
return jsxs("group", { children: [xrEnabled ? jsxs(Fragment, { children: [jsx(Suspense, { fallback: null, children: jsx(LazyXRSceneComponents, {}) }), jsx(Suspense, { fallback: jsx(GeometryAndMesh, { ...geometryAndMeshProps }), children: jsx(LazyGeometryAndMeshXR, { ...geometryAndMeshProps }) })] }) : jsx(GeometryAndMesh, { ...geometryAndMeshProps }), jsx(OrbitControls, { ref: orbitRef, enableDamping: false, dampingFactor: 0 })] });
|
|
1291
1291
|
}
|
|
1292
|
+
let xrModule = null;
|
|
1293
|
+
async function loadXRModule() {
|
|
1294
|
+
xrModule = await import("@react-three/xr");
|
|
1295
|
+
return xrModule;
|
|
1296
|
+
}
|
|
1297
|
+
function getXRModule() {
|
|
1298
|
+
if (!xrModule) {
|
|
1299
|
+
throw new Error("@react-three/xr is not loaded; call loadXRModule() first.");
|
|
1300
|
+
}
|
|
1301
|
+
return xrModule;
|
|
1302
|
+
}
|
|
1292
1303
|
const LazyXRWrapper = React__default.lazy(
|
|
1293
1304
|
// eslint-disable-next-line implicit-arrow-linebreak, function-paren-newline
|
|
1294
|
-
() => import("./XRWrapper-
|
|
1305
|
+
() => import("./XRWrapper-BB28re-M.js").catch(() => ({
|
|
1295
1306
|
default: ({ children }) => children
|
|
1296
1307
|
}))
|
|
1297
1308
|
);
|
|
1298
1309
|
const LazyXREnterButton = React__default.lazy(
|
|
1299
1310
|
// eslint-disable-next-line implicit-arrow-linebreak, function-paren-newline
|
|
1300
|
-
() => import("./XREnterButton-
|
|
1311
|
+
() => import("./XREnterButton-DZUdn-IL.js").catch(() => ({
|
|
1301
1312
|
default: () => null
|
|
1302
1313
|
}))
|
|
1303
1314
|
);
|
|
1304
1315
|
const SpatialWrapper = forwardRef((props, canvasRef) => {
|
|
1305
1316
|
const [xrAvailable, setXrAvailable] = useState(false);
|
|
1306
1317
|
useEffect(() => {
|
|
1307
|
-
|
|
1318
|
+
loadXRModule().then(() => setXrAvailable(true)).catch(() => {
|
|
1308
1319
|
});
|
|
1309
1320
|
}, []);
|
|
1310
1321
|
return jsxs("div", { style: { width: "100%", height: "100%" }, children: [xrAvailable && jsx(Suspense, { fallback: null, children: jsx(LazyXREnterButton, {}) }), jsx(Canvas, { style: { position: "absolute", top: 0, left: 0 }, camera: {
|
|
@@ -1322,6 +1333,7 @@ const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
1322
1333
|
export {
|
|
1323
1334
|
MeasureLine as M,
|
|
1324
1335
|
index as a,
|
|
1336
|
+
getXRModule as g,
|
|
1325
1337
|
isValidGeometrySize as i,
|
|
1326
1338
|
stringifyLineData as s
|
|
1327
1339
|
};
|
|
@@ -3,8 +3,8 @@ import { useRef, useState, useMemo, useEffect, Suspense } from "react";
|
|
|
3
3
|
import { useThree, useFrame, Canvas } from "@react-three/fiber";
|
|
4
4
|
import { OrbitControls } from "@react-three/drei";
|
|
5
5
|
import * as THREE from "three";
|
|
6
|
-
import { Data3DTexture, RedFormat, UnsignedByteType, LinearFilter, RedIntegerFormat, UnsignedIntType, NearestFilter, Vector3, Vector2, Vector4, UniformsUtils
|
|
7
|
-
import { l as log, i as isEqual, C as CoordinationType, u as useEventCallback } from "./index-
|
|
6
|
+
import { Data3DTexture, RedFormat, UnsignedByteType, LinearFilter, RedIntegerFormat, UnsignedIntType, NearestFilter, Vector3, Vector2, Vector4, UniformsUtils } from "three";
|
|
7
|
+
import { l as log, i as isEqual, C as CoordinationType, u as useEventCallback } from "./index-moreUHDf.js";
|
|
8
8
|
const LogLevel = {
|
|
9
9
|
INFO: "info",
|
|
10
10
|
WARN: "warn",
|
|
@@ -3210,7 +3210,7 @@ class VolumeRenderManager {
|
|
|
3210
3210
|
}
|
|
3211
3211
|
/**
|
|
3212
3212
|
* Sets the processing render target
|
|
3213
|
-
* @param {
|
|
3213
|
+
* @param {import('three').WebGLRenderTarget} mrt - Render target with 3 attachments
|
|
3214
3214
|
*/
|
|
3215
3215
|
/*
|
|
3216
3216
|
setProcessingTargets(mrt) {
|
|
@@ -3604,8 +3604,9 @@ function VolumeView(props) {
|
|
|
3604
3604
|
useEffect(() => {
|
|
3605
3605
|
logWithColor("useEffect MRT target matching canvas");
|
|
3606
3606
|
const { width, height } = gl.domElement;
|
|
3607
|
-
const mrt = new
|
|
3608
|
-
mrt.
|
|
3607
|
+
const mrt = new THREE.WebGLRenderTarget(width, height, { count: 3 });
|
|
3608
|
+
const mrtTextures = mrt.textures;
|
|
3609
|
+
mrtTextures.forEach((tex) => {
|
|
3609
3610
|
tex.format = THREE.RGBAFormat;
|
|
3610
3611
|
tex.type = THREE.UnsignedByteType;
|
|
3611
3612
|
tex.minFilter = THREE.NearestFilter;
|
|
@@ -3618,7 +3619,7 @@ function VolumeView(props) {
|
|
|
3618
3619
|
const screenMaterial = new THREE.ShaderMaterial({
|
|
3619
3620
|
uniforms: {
|
|
3620
3621
|
// Bind the first render target texture as the input of the gaussian blur shader.
|
|
3621
|
-
tDiffuse: { value:
|
|
3622
|
+
tDiffuse: { value: mrtTextures[0] },
|
|
3622
3623
|
resolution: { value: new THREE.Vector2(width, height) },
|
|
3623
3624
|
gaussian: { value: 7 }
|
|
3624
3625
|
},
|