@vitessce/dev 4.0.0-test.0 → 4.0.0-test.2

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 (24) hide show
  1. package/dist/{GeometryAndMeshXR-Oj2zI_sI.js → GeometryAndMeshXR-CKq-QN2V.js} +4 -4
  2. package/dist/{OrbitControls-5ELNF_nQ.js → OrbitControls-3kvAx_bm.js} +1 -1
  3. package/dist/{ReactNeuroglancer-Bs7JMUO5.js → ReactNeuroglancer-B2ZYQpR_.js} +83 -28
  4. package/dist/{XREnterButton-CIzkyQe9.js → XREnterButton-D2bwhG22.js} +2 -2
  5. package/dist/{XRSceneComponents-44cQ-EFB.js → XRSceneComponents-CThu7a6X.js} +3 -3
  6. package/dist/XRWrapper-DRaWgrhr.js +10 -0
  7. package/dist/{deflate-Ddy50BQC.js → deflate-CMGMgnZ7.js} +1 -1
  8. package/dist/{emulate-CZbU4bg1.js → emulate-DgwsWyZo.js} +2 -2
  9. package/dist/{higlass-D7Nr2NjU.js → higlass-CRUcLDuS.js} +9888 -7873
  10. package/dist/{index-C9uEW-7L.js → index-BfhRmnqb.js} +16 -6
  11. package/dist/{index-CdO3jExn.js → index-BkcsTpHg.js} +695 -434
  12. package/dist/{index-B_VSuhac.js → index-C-X_ahOA.js} +67 -10
  13. package/dist/{index-D3JEwl5a.js → index-DuGF-3UQ.js} +2 -2
  14. package/dist/index.js +1 -1
  15. package/dist/{jpeg-DQVF89G5.js → jpeg-B73QAFMi.js} +1 -1
  16. package/dist/{lerc-BcM7iRo4.js → lerc-CAJ3Y0cq.js} +1 -1
  17. package/dist/{lzw-DJUuf0zY.js → lzw-D76PzfLd.js} +1 -1
  18. package/dist/{packbits-LM83yS7N.js → packbits-DB_LLrYE.js} +1 -1
  19. package/dist/{raw-CXfphBZa.js → raw-DE4Hzim5.js} +1 -1
  20. package/dist/{ray-grab-CZLm2XVj.js → ray-grab-DZpbNNCS.js} +3 -3
  21. package/dist/{webimage-DMjnadGD.js → webimage-Cb-GqMg_.js} +1 -1
  22. package/dist/{xrStore-BXas99tA.js → xrStore-633UaA-M.js} +2 -2
  23. package/package.json +5 -5
  24. package/dist/XRWrapper-CPiZ4M25.js +0 -10
@@ -1,6 +1,6 @@
1
- import { l as log, i as isEqual, c as atLeastLogLevel, D as Data3DTexture, R as RedFormat, U as UnsignedByteType, d as LinearFilter, e as RedIntegerFormat, f as UnsignedIntType, N as NearestFilter, h as LogLevel, V as Vector3, k as Vector2, m as Vector4, n as UniformsUtils, C as CoordinationType, W as WebGLMultipleRenderTargets, o as RGBAFormat, S as Scene, O as OrthographicCamera, p as ShaderMaterial, q as Mesh, P as PlaneGeometry, u as useEventCallback, j as jsxRuntimeExports, G as GLSL3, r as BackSide } from "./index-CdO3jExn.js";
1
+ import { l as log, i as isEqual, c as atLeastLogLevel, D as Data3DTexture, R as RedFormat, U as UnsignedByteType, d as LinearFilter, e as RedIntegerFormat, f as UnsignedIntType, N as NearestFilter, h as LogLevel, V as Vector3, k as Vector2, m as Vector4, n as UniformsUtils, C as CoordinationType, W as WebGLMultipleRenderTargets, o as RGBAFormat, S as Scene, O as OrthographicCamera, p as ShaderMaterial, q as Mesh, P as PlaneGeometry, u as useEventCallback, j as jsxRuntimeExports, G as GLSL3, r as BackSide } from "./index-BkcsTpHg.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-5ELNF_nQ.js";
3
+ import { u as useThree, a as useFrame, O as OrbitControls, C as Canvas } from "./OrbitControls-3kvAx_bm.js";
4
4
  const BRICK_SIZE = 32;
5
5
  const BRICK_CACHE_SIZE_X = 64;
6
6
  const BRICK_CACHE_SIZE_Y = 64;
@@ -205,7 +205,8 @@ function _requestBufferToRequestObjects(buffer, k, optsForWeighting) {
205
205
  }
206
206
  counts.set(packed, (counts.get(packed) || 0) + weight);
207
207
  }
208
- const requests = [...counts.entries()].sort((a, b) => b[1] - a[1]).slice(0, k).map(([packed]) => ({
208
+ const sorted = Array.from(counts.entries()).toSorted((a, b) => b[1] - a[1]);
209
+ const requests = sorted.slice(0, k).map(([packed]) => ({
209
210
  x: packed >> 22 & 1023,
210
211
  y: packed >> 12 & 1023,
211
212
  z: packed & 4095
@@ -873,6 +874,10 @@ class VolumeDataManager {
873
874
  * the center of the render target.
874
875
  */
875
876
  async processRequestData(buffer, optsForWeighting) {
877
+ if (this.initStatus !== INIT_STATUS.COMPLETE) {
878
+ log.debug("processRequestData: not yet initialized, skipping");
879
+ return;
880
+ }
876
881
  if (this.isBusy) {
877
882
  log.debug("processRequestData: already busy, skipping");
878
883
  return;
@@ -3557,6 +3562,7 @@ function VolumeView(props) {
3557
3562
  geometrySize: [1, 1, 1]
3558
3563
  });
3559
3564
  const is3D = spatialRenderingMode === "3D";
3565
+ const [dmInitComplete, setDmInitComplete] = useState(false);
3560
3566
  const screenSceneRef = useRef(null);
3561
3567
  const screenCameraRef = useRef(null);
3562
3568
  const screenQuadRef = useRef(null);
@@ -3629,6 +3635,7 @@ function VolumeView(props) {
3629
3635
  const initializeDataManager = async () => {
3630
3636
  if (dataManager.initStatus === INIT_STATUS.COMPLETE) {
3631
3637
  log.debug("dataManager already initialized, skipping");
3638
+ setDmInitComplete(true);
3632
3639
  return;
3633
3640
  }
3634
3641
  dataManager.initImages(images, imageLayerScopes);
@@ -3641,6 +3648,7 @@ function VolumeView(props) {
3641
3648
  renderManager.setZarrUniforms(dataManager.zarrStore, dataManager.PT);
3642
3649
  renderManager.setChannelMapping(dataManager.channels.colorMappings);
3643
3650
  log.debug("rm.uniforms", renderManager.uniforms);
3651
+ setDmInitComplete(true);
3644
3652
  invalidate();
3645
3653
  };
3646
3654
  initializeDataManager();
@@ -3650,7 +3658,7 @@ function VolumeView(props) {
3650
3658
  }, [dataManager, renderManager, images, imageLayerScopes]);
3651
3659
  useEffect(() => {
3652
3660
  const on3D = spatialRenderingMode === "3D";
3653
- if (on3D && dataManager && renderManager) {
3661
+ if (on3D && dataManager && renderManager && dmInitComplete) {
3654
3662
  logWithColor("useEffect spatialRenderingMode");
3655
3663
  const propsForRenderManager = {
3656
3664
  images,
@@ -3684,7 +3692,7 @@ function VolumeView(props) {
3684
3692
  }
3685
3693
  }
3686
3694
  }
3687
- }, [dataManager, renderManager, images, imageLayerScopes, imageLayerCoordination, imageChannelScopesByLayer, imageChannelCoordination, spatialRenderingMode]);
3695
+ }, [dataManager, renderManager, images, imageLayerScopes, imageLayerCoordination, imageChannelScopesByLayer, imageChannelCoordination, spatialRenderingMode, dmInitComplete]);
3688
3696
  const RENDER_PRIORITY = 1;
3689
3697
  useFrame((state, delta, xrFrame) => {
3690
3698
  if (!mrtRef.current || !dataManager || !renderManager) {
@@ -3735,6 +3743,8 @@ function VolumeView(props) {
3735
3743
  }, 300);
3736
3744
  });
3737
3745
  useEffect(() => {
3746
+ if (!dmInitComplete)
3747
+ return;
3738
3748
  logWithColor("useEffect firstImageLayerChannelCoordination");
3739
3749
  setIsInteracting(true);
3740
3750
  log.debug("something about channels changed");
@@ -3744,7 +3754,7 @@ function VolumeView(props) {
3744
3754
  interactionTimeoutRef.current = setTimeout(() => {
3745
3755
  setIsInteracting(false);
3746
3756
  }, 300);
3747
- }, [dataManager, firstImageLayerChannelCoordination, renderManager, setIsInteracting]);
3757
+ }, [dataManager, firstImageLayerChannelCoordination, renderManager, setIsInteracting, dmInitComplete]);
3748
3758
  const stopLoading = useEventCallback(() => {
3749
3759
  if (dataManager) {
3750
3760
  dataManager.stopLoading();