@vitessce/dev 3.9.4 → 3.9.6
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/{OrbitControls-C07_Mag2.js → OrbitControls-L6I9M6QX.js} +1 -1
- package/dist/{ReactNeuroglancer-D5cizHry.js → ReactNeuroglancer-5eQa4brk.js} +1 -1
- package/dist/{deflate-C0I5gtks.js → deflate-BlfSi-73.js} +1 -1
- package/dist/{higlass-BwvPxncu.js → higlass-Dzj0Wtv9.js} +1 -1
- package/dist/{index--WefMKNj.js → index-CsQFLn-E.js} +3 -3
- package/dist/{index-BlJhBB2A.js → index-Cz_XfJLz.js} +45 -8
- package/dist/{index-CjrZwFeM.js → index-GnGmMble.js} +799 -197
- package/dist/index.js +1 -1
- package/dist/{jpeg-BPMAfJb0.js → jpeg-GTyf0pdQ.js} +1 -1
- package/dist/{lerc-iE1wd1ee.js → lerc-Cxsf6swu.js} +1 -1
- package/dist/{lzw-BzR9EnvE.js → lzw-C4E5VmNh.js} +1 -1
- package/dist/{packbits-Ce-hCmNg.js → packbits-CJAiTkd4.js} +1 -1
- package/dist/{raw-DaPh9zAH.js → raw-D9awu0AB.js} +1 -1
- package/dist/{troika-three-text.esm-x33bJ1eV.js → troika-three-text.esm-IXbnNvXc.js} +1 -1
- package/dist/{webimage-JIdmi6ST.js → webimage-Ca1vS7aF.js} +1 -1
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aI as getDefaultExportFromCjs, aJ as Raycaster, W as OrthographicCamera, K as PerspectiveCamera, av as Scene, aK as PCFSoftShadowMap, aL as VSMShadowMap, aM as PCFShadowMap, aN as BasicShadowMap, aO as NoToneMapping, aP as ACESFilmicToneMapping, e as Vector3, V as Vector2, aQ as Clock, aR as WebGLRenderer, aS as Camera, x as BufferGeometry, r as Material, aT as Layers, a1 as Texture, aE as RGBAFormat, az as UnsignedByteType, C as Color, aj as _extends, aU as THREE, aV as EventDispatcher, aW as MOUSE, aX as TOUCH, aY as Spherical, Q as Quaternion, an as Ray, ak as Plane } from "./index-
|
|
1
|
+
import { aI as getDefaultExportFromCjs, aJ as Raycaster, W as OrthographicCamera, K as PerspectiveCamera, av as Scene, aK as PCFSoftShadowMap, aL as VSMShadowMap, aM as PCFShadowMap, aN as BasicShadowMap, aO as NoToneMapping, aP as ACESFilmicToneMapping, e as Vector3, V as Vector2, aQ as Clock, aR as WebGLRenderer, aS as Camera, x as BufferGeometry, r as Material, aT as Layers, a1 as Texture, aE as RGBAFormat, az as UnsignedByteType, C as Color, aj as _extends, aU as THREE, aV as EventDispatcher, aW as MOUSE, aX as TOUCH, aY as Spherical, Q as Quaternion, an as Ray, ak as Plane } from "./index-GnGmMble.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import React__default, { useReducer, useRef, useEffect, useLayoutEffect, useDebugValue, useState, useMemo } from "react";
|
|
4
4
|
var constants = { exports: {} };
|
|
@@ -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 { aI as getDefaultExportFromCjs, b3 as requireAssign, b4 as require_export, b5 as require_core, b6 as require_fails, b7 as require_toObject, b8 as require_objectKeys, b9 as require_cof, ba as require_wks, bb as require_iterators, bc as requireWeb_dom_iterable, bd as requireEs6_string_iterator, be as require_anObject, bf as require_hide, bg as require_ctx, bh as require_toLength, bi as require_global, bj as require_objectDp, bk as require_descriptors, bl as require_isObject, bm as require_objectCreate, bn as require_iterDefine, bo as require_iterStep, bp as require_meta, bq as require_isArray, br as require_iobject, bs as require_setToStringTag, bt as require_aFunction, bu as requireIterator, bv as require_propertyDesc, bw as require_root, bx as require_baseGetTag, by as requireIsObjectLike, bz as requireIsObject, bA as requireEs6_symbol, bB as requireDefineProperty, bC as require_toIobject, bD as require_objectGopd, bE as require_html, bF as require_domCreate, bG as require_library, bH as requireSymbol, bI as require_objectPie, bJ as require_has, bK as require_redefine, bL as require_objectAssign, bM as diffCameraState, ao as jsxRuntimeExports } from "./index-
|
|
4
|
+
import { aI as getDefaultExportFromCjs, b3 as requireAssign, b4 as require_export, b5 as require_core, b6 as require_fails, b7 as require_toObject, b8 as require_objectKeys, b9 as require_cof, ba as require_wks, bb as require_iterators, bc as requireWeb_dom_iterable, bd as requireEs6_string_iterator, be as require_anObject, bf as require_hide, bg as require_ctx, bh as require_toLength, bi as require_global, bj as require_objectDp, bk as require_descriptors, bl as require_isObject, bm as require_objectCreate, bn as require_iterDefine, bo as require_iterStep, bp as require_meta, bq as require_isArray, br as require_iobject, bs as require_setToStringTag, bt as require_aFunction, bu as requireIterator, bv as require_propertyDesc, bw as require_root, bx as require_baseGetTag, by as requireIsObjectLike, bz as requireIsObject, bA as requireEs6_symbol, bB as requireDefineProperty, bC as require_toIobject, bD as require_objectGopd, bE as require_html, bF as require_domCreate, bG as require_library, bH as requireSymbol, bI as require_objectPie, bJ as require_has, bK as require_redefine, bL as require_objectAssign, bM as diffCameraState, ao as jsxRuntimeExports } from "./index-GnGmMble.js";
|
|
5
5
|
import React__default from "react";
|
|
6
6
|
var assignExports = requireAssign();
|
|
7
7
|
const _Object$assign = /* @__PURE__ */ getDefaultExportFromCjs(assignExports);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-SxljTded.js";
|
|
2
|
-
import { aZ as BaseDecoder } from "./index-
|
|
2
|
+
import { aZ as BaseDecoder } from "./index-GnGmMble.js";
|
|
3
3
|
class DeflateDecoder extends BaseDecoder {
|
|
4
4
|
decodeBlock(buffer) {
|
|
5
5
|
return inflate_1(new Uint8Array(buffer)).buffer;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React$7 from "react";
|
|
2
2
|
import React__default, { isValidElement, PureComponent, Component, createElement, createContext, createRef } from "react";
|
|
3
3
|
import ReactDOM__default, { findDOMNode as findDOMNode$1 } from "react-dom";
|
|
4
|
-
import { b0 as commonjsGlobal$1, b1 as requireObjectAssign, aI as getDefaultExportFromCjs$1, b2 as earcut } from "./index-
|
|
4
|
+
import { b0 as commonjsGlobal$1, b1 as requireObjectAssign, aI as getDefaultExportFromCjs$1, b2 as earcut } from "./index-GnGmMble.js";
|
|
5
5
|
var promise = {};
|
|
6
6
|
var hasRequiredPromise;
|
|
7
7
|
function requirePromise() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { G as Group, M as Matrix4, T as TrianglesDrawMode, a as TriangleFanDrawMode, b as TriangleStripDrawMode, R as REVISION, L as Loader, c as LoaderUtils, F as FileLoader, d as MeshPhysicalMaterial, V as Vector2, C as Color, S as SpotLight, P as PointLight, D as DirectionalLight, e as Vector3, I as InstancedMesh, Q as Quaternion, O as Object3D, f as TextureLoader, g as ImageBitmapLoader, B as BufferAttribute, h as InterleavedBuffer, i as LinearMipmapLinearFilter, N as NearestMipmapLinearFilter, j as LinearMipmapNearestFilter, k as NearestMipmapNearestFilter, l as LinearFilter, m as NearestFilter, n as RepeatWrapping, o as MirroredRepeatWrapping, p as ClampToEdgeWrapping, q as PointsMaterial, r as Material, s as LineBasicMaterial, t as MeshStandardMaterial, u as DoubleSide, v as MeshBasicMaterial, w as PropertyBinding, x as BufferGeometry, y as SkinnedMesh, z as Mesh, A as LineSegments, E as Line$1, H as LineLoop, J as Points, K as PerspectiveCamera, U as MathUtils, W as OrthographicCamera, X as Skeleton, Y as InterpolateDiscrete, Z as InterpolateLinear, _ as AnimationClip, $ as Bone, a0 as InterleavedBufferAttribute, a1 as Texture, a2 as VectorKeyframeTrack, a3 as QuaternionKeyframeTrack, a4 as NumberKeyframeTrack, a5 as FrontSide, a6 as Interpolant, a7 as Box3, a8 as Sphere, a9 as InstancedBufferGeometry, aa as Float32BufferAttribute, ab as InstancedInterleavedBuffer, ac as WireframeGeometry, ad as ShaderMaterial, ae as UniformsUtils, af as UniformsLib, ag as Vector4, ah as Line3, ai as SphereGeometry, aj as _extends, ak as Plane, al as Triangle, am as BackSide, an as Ray$1, ao as jsxRuntimeExports, ap as Matrix3, aq as CoordinationType, ar as Data3DTexture, as as RedFormat, at as FloatType, au as getImageSize, av as Scene } from "./index-
|
|
1
|
+
import { G as Group, M as Matrix4, T as TrianglesDrawMode, a as TriangleFanDrawMode, b as TriangleStripDrawMode, R as REVISION, L as Loader, c as LoaderUtils, F as FileLoader, d as MeshPhysicalMaterial, V as Vector2, C as Color, S as SpotLight, P as PointLight, D as DirectionalLight, e as Vector3, I as InstancedMesh, Q as Quaternion, O as Object3D, f as TextureLoader, g as ImageBitmapLoader, B as BufferAttribute, h as InterleavedBuffer, i as LinearMipmapLinearFilter, N as NearestMipmapLinearFilter, j as LinearMipmapNearestFilter, k as NearestMipmapNearestFilter, l as LinearFilter, m as NearestFilter, n as RepeatWrapping, o as MirroredRepeatWrapping, p as ClampToEdgeWrapping, q as PointsMaterial, r as Material, s as LineBasicMaterial, t as MeshStandardMaterial, u as DoubleSide, v as MeshBasicMaterial, w as PropertyBinding, x as BufferGeometry, y as SkinnedMesh, z as Mesh, A as LineSegments, E as Line$1, H as LineLoop, J as Points, K as PerspectiveCamera, U as MathUtils, W as OrthographicCamera, X as Skeleton, Y as InterpolateDiscrete, Z as InterpolateLinear, _ as AnimationClip, $ as Bone, a0 as InterleavedBufferAttribute, a1 as Texture, a2 as VectorKeyframeTrack, a3 as QuaternionKeyframeTrack, a4 as NumberKeyframeTrack, a5 as FrontSide, a6 as Interpolant, a7 as Box3, a8 as Sphere, a9 as InstancedBufferGeometry, aa as Float32BufferAttribute, ab as InstancedInterleavedBuffer, ac as WireframeGeometry, ad as ShaderMaterial, ae as UniformsUtils, af as UniformsLib, ag as Vector4, ah as Line3, ai as SphereGeometry, aj as _extends, ak as Plane, al as Triangle, am as BackSide, an as Ray$1, ao as jsxRuntimeExports, ap as Matrix3, aq as CoordinationType, ar as Data3DTexture, as as RedFormat, at as FloatType, au as getImageSize, av as Scene } from "./index-GnGmMble.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { useRef, useEffect, useState, forwardRef } from "react";
|
|
4
|
-
import { u as useThree, a as useFrame, c as create, e as extend, b as createPortal, O as OrbitControls, C as Canvas } from "./OrbitControls-
|
|
4
|
+
import { u as useThree, a as useFrame, c as create, e as extend, b as createPortal, O as OrbitControls, C as Canvas } from "./OrbitControls-L6I9M6QX.js";
|
|
5
5
|
const isPromise = (promise) => typeof promise === "object" && typeof promise.then === "function";
|
|
6
6
|
const globalCache = [];
|
|
7
7
|
function shallowEqualArrays(arrA, arrB, equal = (a, b) => a === b) {
|
|
@@ -5027,7 +5027,7 @@ const Text = /* @__PURE__ */ React.forwardRef(({
|
|
|
5027
5027
|
const {
|
|
5028
5028
|
Text: TextMeshImpl,
|
|
5029
5029
|
preloadFont
|
|
5030
|
-
} = suspend(async () => import("./troika-three-text.esm-
|
|
5030
|
+
} = suspend(async () => import("./troika-three-text.esm-IXbnNvXc.js"), []);
|
|
5031
5031
|
const invalidate = useThree(({
|
|
5032
5032
|
invalidate: invalidate2
|
|
5033
5033
|
}) => invalidate2);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { aw as log, ax as isEqual, ay as atLeastLogLevel, ar as Data3DTexture, as as RedFormat, az as UnsignedByteType, l as LinearFilter, aA as RedIntegerFormat, aB as UnsignedIntType, m as NearestFilter, aC as LogLevel, e as Vector3, V as Vector2, ag as Vector4, ae as UniformsUtils, aq as CoordinationType, aD as WebGLMultipleRenderTargets, aE as RGBAFormat, av as Scene, W as OrthographicCamera, ad as ShaderMaterial, z as Mesh, aF as PlaneGeometry, aG as useEventCallback, ao as jsxRuntimeExports, aH as GLSL3, am as BackSide } from "./index-
|
|
1
|
+
import { aw as log, ax as isEqual, ay as atLeastLogLevel, ar as Data3DTexture, as as RedFormat, az as UnsignedByteType, l as LinearFilter, aA as RedIntegerFormat, aB as UnsignedIntType, m as NearestFilter, aC as LogLevel, e as Vector3, V as Vector2, ag as Vector4, ae as UniformsUtils, aq as CoordinationType, aD as WebGLMultipleRenderTargets, aE as RGBAFormat, av as Scene, W as OrthographicCamera, ad as ShaderMaterial, z as Mesh, aF as PlaneGeometry, aG as useEventCallback, ao as jsxRuntimeExports, aH as GLSL3, am as BackSide } from "./index-GnGmMble.js";
|
|
2
2
|
import { useRef, useState, useMemo, useEffect, Suspense } from "react";
|
|
3
|
-
import { u as useThree, a as useFrame, O as OrbitControls, C as Canvas } from "./OrbitControls-
|
|
3
|
+
import { u as useThree, a as useFrame, O as OrbitControls, C as Canvas } from "./OrbitControls-L6I9M6QX.js";
|
|
4
4
|
const BRICK_SIZE = 32;
|
|
5
5
|
const BRICK_CACHE_SIZE_X = 64;
|
|
6
6
|
const BRICK_CACHE_SIZE_Y = 64;
|
|
@@ -174,9 +174,17 @@ function _ptToZarr(ptx, pty, ptz, ptInfo) {
|
|
|
174
174
|
z
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
|
-
|
|
177
|
+
const DEFAULT_SIGMA_NORMALIZED = 0.25;
|
|
178
|
+
function _requestBufferToRequestObjects(buffer, k, optsForWeighting) {
|
|
178
179
|
const counts = /* @__PURE__ */ new Map();
|
|
179
|
-
|
|
180
|
+
const { width, height, sigmaNormalized } = optsForWeighting;
|
|
181
|
+
const useWeighting = Number.isInteger(width) && Number.isInteger(height) && width > 0 && height > 0 && typeof sigmaNormalized === "number";
|
|
182
|
+
if (!useWeighting) {
|
|
183
|
+
log.warn("_requestBufferToRequestObjects: proceeding without weighting");
|
|
184
|
+
}
|
|
185
|
+
const maxPixels = Math.floor(buffer.length / 4);
|
|
186
|
+
for (let pix = 0; pix < maxPixels; pix += 1) {
|
|
187
|
+
const i = pix * 4;
|
|
180
188
|
const r = buffer[i];
|
|
181
189
|
const g = buffer[i + 1];
|
|
182
190
|
const b = buffer[i + 2];
|
|
@@ -185,7 +193,17 @@ function _requestBufferToRequestObjects(buffer, k) {
|
|
|
185
193
|
continue;
|
|
186
194
|
}
|
|
187
195
|
const packed = (r << 24 | g << 16 | b << 8 | a) >>> 0;
|
|
188
|
-
|
|
196
|
+
let weight = 1;
|
|
197
|
+
if (useWeighting) {
|
|
198
|
+
const x = pix % width;
|
|
199
|
+
const y = Math.floor(pix / width);
|
|
200
|
+
const dx = x - width / 2;
|
|
201
|
+
const dy = y - height / 2;
|
|
202
|
+
const nd = Math.sqrt(dx * dx / (width * width) + dy * dy / (height * height));
|
|
203
|
+
const norm = nd / sigmaNormalized;
|
|
204
|
+
weight = Math.exp(-0.5 * norm * norm);
|
|
205
|
+
}
|
|
206
|
+
counts.set(packed, (counts.get(packed) || 0) + weight);
|
|
189
207
|
}
|
|
190
208
|
const requests = [...counts.entries()].sort((a, b) => b[1] - a[1]).slice(0, k).map(([packed]) => ({
|
|
191
209
|
x: packed >> 22 & 1023,
|
|
@@ -842,7 +860,19 @@ class VolumeDataManager {
|
|
|
842
860
|
}
|
|
843
861
|
return chunkEntry.data;
|
|
844
862
|
}
|
|
845
|
-
|
|
863
|
+
/**
|
|
864
|
+
* Process the buffer of brick requests from the shader, turning them into
|
|
865
|
+
* actual Promises for Zarr chunks on the JS side.
|
|
866
|
+
* @param {Uint8Array} buffer The bufRequest (of length width*height*4)
|
|
867
|
+
* containing the brick requests from the shader.
|
|
868
|
+
* @param {object} optsForWeighting
|
|
869
|
+
* @param {number} optsForWeighting.width The width of the render target.
|
|
870
|
+
* @param {number} optsForWeighting.height The height of the render target.
|
|
871
|
+
* @param {number} optsForWeighting.sigmaNormalized The normalized sigma value
|
|
872
|
+
* to use for weighting the brick requests based on their distance from
|
|
873
|
+
* the center of the render target.
|
|
874
|
+
*/
|
|
875
|
+
async processRequestData(buffer, optsForWeighting) {
|
|
846
876
|
if (this.isBusy) {
|
|
847
877
|
log.debug("processRequestData: already busy, skipping");
|
|
848
878
|
return;
|
|
@@ -857,7 +887,7 @@ class VolumeDataManager {
|
|
|
857
887
|
}
|
|
858
888
|
this.isBusy = true;
|
|
859
889
|
this.triggerRequest = false;
|
|
860
|
-
const { requests, origRequestCount } = _requestBufferToRequestObjects(buffer, this.k);
|
|
890
|
+
const { requests, origRequestCount } = _requestBufferToRequestObjects(buffer, this.k, optsForWeighting);
|
|
861
891
|
if (requests.length === 0) {
|
|
862
892
|
this.noNewRequests = true;
|
|
863
893
|
}
|
|
@@ -3420,7 +3450,14 @@ function handleRequests(_gl, { frameRef, dataManager, mrtRef, bufRequest, bufUsa
|
|
|
3420
3450
|
ctx.bindFramebuffer(ctx.READ_FRAMEBUFFER, framebufferFor(_gl, mrtRef.current));
|
|
3421
3451
|
ctx.readBuffer(ctx.COLOR_ATTACHMENT1);
|
|
3422
3452
|
ctx.readPixels(0, 0, mrtRef.current.width, mrtRef.current.height, ctx.RGBA, ctx.UNSIGNED_BYTE, bufRequest.current);
|
|
3423
|
-
dataManager.processRequestData(bufRequest.current
|
|
3453
|
+
dataManager.processRequestData(bufRequest.current, {
|
|
3454
|
+
// If width/height are not yet available,
|
|
3455
|
+
// processRequestData will proceed without weighting.
|
|
3456
|
+
width: mrtRef?.current?.width,
|
|
3457
|
+
height: mrtRef?.current?.height,
|
|
3458
|
+
// Default sigmaNormalized = 0.25; can be tuned
|
|
3459
|
+
sigmaNormalized: DEFAULT_SIGMA_NORMALIZED
|
|
3460
|
+
});
|
|
3424
3461
|
} else if (dataManager.triggerUsage === true && dataManager.noNewRequests === false) {
|
|
3425
3462
|
ctx.bindFramebuffer(ctx.READ_FRAMEBUFFER, framebufferFor(_gl, mrtRef.current));
|
|
3426
3463
|
ctx.readBuffer(ctx.COLOR_ATTACHMENT2);
|