@vitessce/comparative 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 (23) hide show
  1. package/dist/{GeometryAndMeshXR-DbXTK2iw.js → GeometryAndMeshXR-Rj8DuqKI.js} +4 -4
  2. package/dist/{OrbitControls-BRGXsf1T.js → OrbitControls-CSK4x9Nb.js} +1 -1
  3. package/dist/{ReactNeuroglancer-Crb1U7Tn.js → ReactNeuroglancer-BAmwPpri.js} +696 -661
  4. package/dist/{XREnterButton-C9Klf67I.js → XREnterButton-BTyk-JNM.js} +1 -1
  5. package/dist/{XRSceneComponents-DiBc2L-q.js → XRSceneComponents-Bdj5nq7u.js} +2 -2
  6. package/dist/{XRWrapper-CUvoPsz0.js → XRWrapper-C_ChUWmZ.js} +2 -2
  7. package/dist/{deflate-B9H5qR9U.js → deflate-CrBkHn3o.js} +1 -1
  8. package/dist/{emulate-_ez3oxw8.js → emulate-BMuLpa2M.js} +2 -2
  9. package/dist/{higlass-B_MV2PxY.js → higlass-R4akpd_U.js} +31823 -30868
  10. package/dist/{index-BX839aW7.js → index-BvABCvu0.js} +65 -8
  11. package/dist/{index-D0v2yFRh.js → index-CaGs2wGk.js} +370 -366
  12. package/dist/{index-bml8OCCz.js → index-ChP-N2-Q.js} +100916 -100730
  13. package/dist/{index-BKHCQDj_.js → index-evkxJwCU.js} +1 -1
  14. package/dist/index.min.js +1 -1
  15. package/dist/{jpeg-D_7ycwtQ.js → jpeg-CmFz2x7u.js} +1 -1
  16. package/dist/{lerc-BqhNOBeL.js → lerc-D9Z1SChC.js} +1 -1
  17. package/dist/{lzw-DUcfioj8.js → lzw-BxcPIsd9.js} +1 -1
  18. package/dist/{packbits-CgF8yylX.js → packbits-BvyhLVrx.js} +1 -1
  19. package/dist/{raw-CuemTavy.js → raw-nQNg2593.js} +1 -1
  20. package/dist/{ray-grab-4cLIYg6C.js → ray-grab-CunbRXU8.js} +3 -3
  21. package/dist/{webimage-BulHlQ32.js → webimage-CD0PiPO_.js} +1 -1
  22. package/dist/{xrStore-Ckkme0YQ.js → xrStore-BFuIULKr.js} +1 -1
  23. package/package.json +11 -11
@@ -1,17 +1,17 @@
1
- import { jsxs as ne, jsx as F } from "react/jsx-runtime";
2
- import { useRef as M, useState as he, useMemo as fe, useEffect as $, Suspense as ze } from "react";
3
- import { u as de, a as ke, O as ve, C as Ie } from "./OrbitControls-BRGXsf1T.js";
4
- import { l as n, i as De, c as le, D as me, R as Me, U as Ce, d as ge, e as Pe, f as Ae, N as ie, h as ce, V as C, j as _, k as Z, m as Be, C as P, W as Ne, n as Ue, S as Le, O as Oe, o as Fe, p as Ve, P as Ge, u as j, G as qe, q as Ze } from "./index-bml8OCCz.js";
5
- const S = 32, B = 64, G = 64, ue = 4, se = B * G * ue, xe = B * S, pe = G * S, be = ue * S, V = {
1
+ import { jsxs as re, jsx as V } from "react/jsx-runtime";
2
+ import { useRef as D, useState as se, useMemo as fe, useEffect as Q, Suspense as Ie } from "react";
3
+ import { u as de, a as De, O as ve, C as Me } from "./OrbitControls-CSK4x9Nb.js";
4
+ import { l as n, i as Pe, c as ce, D as me, R as Ae, U as Ce, d as ge, e as Be, f as Ne, N as oe, h as ue, V as C, j as _, k as j, m as Ue, C as M, W as Le, n as Oe, S as Fe, O as Ve, o as Ge, p as qe, P as Ze, u as H, G as Xe, q as je } from "./index-ChP-N2-Q.js";
5
+ const w = 32, A = 64, q = 64, he = 4, le = A * q * he, xe = A * w, pe = q * w, be = he * w, F = {
6
6
  NOT_STARTED: "not_started",
7
7
  IN_PROGRESS: "in_progress",
8
8
  COMPLETE: "complete",
9
9
  FAILED: "failed"
10
10
  };
11
- function z(f) {
12
- le(ce.DEBUG) && console.warn(`%cDM: ${f}`, "background: blue; color: white; padding: 2px; border-radius: 3px;");
11
+ function k(f) {
12
+ ce(ue.DEBUG) && console.warn(`%cDM: ${f}`, "background: blue; color: white; padding: 2px; border-radius: 3px;");
13
13
  }
14
- function Xe(f) {
14
+ function Ye(f) {
15
15
  return f.map((t) => {
16
16
  const { dims: e } = t;
17
17
  return [
@@ -26,7 +26,7 @@ function Xe(f) {
26
26
  ];
27
27
  });
28
28
  }
29
- function je(f) {
29
+ function He(f) {
30
30
  return f.map((t) => {
31
31
  const e = [
32
32
  t.depth,
@@ -37,13 +37,13 @@ function je(f) {
37
37
  // x
38
38
  ];
39
39
  return [
40
- Math.ceil((e[0] || 1) / S),
41
- Math.ceil((e[1] || 1) / S),
42
- Math.ceil((e[2] || 1) / S)
40
+ Math.ceil((e[0] || 1) / w),
41
+ Math.ceil((e[1] || 1) / w),
42
+ Math.ceil((e[2] || 1) / w)
43
43
  ];
44
44
  });
45
45
  }
46
- function Ye(f, t) {
46
+ function Ke(f, t) {
47
47
  n.debug("_initMRMCPT", f, t);
48
48
  const e = {
49
49
  channelOffsets: [
@@ -83,69 +83,69 @@ function Ye(f, t) {
83
83
  const r = new Uint32Array(e.xExtent * e.yExtent * e.zTotal);
84
84
  r.fill(0);
85
85
  const a = new me(o, xe, pe, be);
86
- a.format = Me, a.type = Ce, a.internalFormat = "R8", a.minFilter = ge, a.magFilter = ge, a.generateMipmaps = !1, a.needsUpdate = !0;
87
- const l = new me(r, e.xExtent, e.yExtent, e.zTotal);
88
- return l.format = Pe, l.type = Ae, l.internalFormat = "R32UI", l.minFilter = ie, l.magFilter = ie, l.generateMipmaps = !1, l.needsUpdate = !0, n.debug("_initMRMCPT", e, l, a), {
86
+ a.format = Ae, a.type = Ce, a.internalFormat = "R8", a.minFilter = ge, a.magFilter = ge, a.generateMipmaps = !1, a.needsUpdate = !0;
87
+ const c = new me(r, e.xExtent, e.yExtent, e.zTotal);
88
+ return c.format = Be, c.type = Ne, c.internalFormat = "R32UI", c.minFilter = oe, c.magFilter = oe, c.generateMipmaps = !1, c.needsUpdate = !0, n.debug("_initMRMCPT", e, c, a), {
89
89
  PT: e,
90
- ptTHREE: l,
90
+ ptTHREE: c,
91
91
  bcTHREE: a
92
92
  };
93
93
  }
94
- function He(f, t, e, i, o) {
94
+ function We(f, t, e, i, o) {
95
95
  const r = (a) => Math.max(0, Math.min(127, Math.floor(a / 2)));
96
96
  return (1 << 31 | 1 << 30 | r(f) << 23 | r(t) << 16 | (e & 63) << 10 | (i & 63) << 4 | o & 15) >>> 0;
97
97
  }
98
- function Ke(f, t, e, i) {
98
+ function $e(f, t, e, i) {
99
99
  const { PT_zExtent: o, PT_z0Extent: r, PT_anchors: a } = i;
100
- let l = -1, u = -1, s = -1, v = -1, g = -1;
100
+ let c = -1, u = -1, l = -1, p = -1, m = -1;
101
101
  if (e >= o)
102
- u = 0, s = f, v = t, g = (e - o) % r, l = Math.floor((e - o) / r);
102
+ u = 0, l = f, p = t, m = (e - o) % r, c = Math.floor((e - o) / r);
103
103
  else
104
- for (let c = 1; c < a.length; c++)
105
- if (!(f < a[c][0] && t < a[c][1] && e < a[c][2])) {
106
- u = c;
104
+ for (let s = 1; s < a.length; s++)
105
+ if (!(f < a[s][0] && t < a[s][1] && e < a[s][2])) {
106
+ u = s;
107
107
  const d = [0, 0, 0];
108
- f >= a[c][0] && (d[0] = 1), t >= a[c][1] && (d[1] = 1), e >= a[c][2] && (d[2] = 1);
109
- const m = d[0] << 2 | d[1] << 1 | d[2];
110
- l = Math.max(1, Math.min(7, m)) - 1;
111
- const h = d.map((x, b) => x * a[c][b]);
112
- s = f - h[0], v = t - h[1], g = e - h[2];
108
+ f >= a[s][0] && (d[0] = 1), t >= a[s][1] && (d[1] = 1), e >= a[s][2] && (d[2] = 1);
109
+ const v = d[0] << 2 | d[1] << 1 | d[2];
110
+ c = Math.max(1, Math.min(7, v)) - 1;
111
+ const h = d.map((g, b) => g * a[s][b]);
112
+ l = f - h[0], p = t - h[1], m = e - h[2];
113
113
  break;
114
114
  }
115
115
  return {
116
- channel: l,
116
+ channel: c,
117
117
  resolution: u,
118
- x: s,
119
- y: v,
120
- z: g
118
+ x: l,
119
+ y: p,
120
+ z: m
121
121
  };
122
122
  }
123
- const We = 0.25;
124
- function $e(f, t, e) {
125
- const i = /* @__PURE__ */ new Map(), { width: o, height: r, sigmaNormalized: a } = e, l = Number.isInteger(o) && Number.isInteger(r) && o > 0 && r > 0 && typeof a == "number";
126
- l || n.warn("_requestBufferToRequestObjects: proceeding without weighting");
123
+ const Qe = 0.25;
124
+ function Je(f, t, e) {
125
+ const i = /* @__PURE__ */ new Map(), { width: o, height: r, sigmaNormalized: a } = e, c = Number.isInteger(o) && Number.isInteger(r) && o > 0 && r > 0 && typeof a == "number";
126
+ c || n.warn("_requestBufferToRequestObjects: proceeding without weighting");
127
127
  const u = Math.floor(f.length / 4);
128
- for (let v = 0; v < u; v += 1) {
129
- const g = v * 4, c = f[g], d = f[g + 1], m = f[g + 2], h = f[g + 3];
130
- if ((c | d | m | h) === 0)
128
+ for (let m = 0; m < u; m += 1) {
129
+ const s = m * 4, d = f[s], v = f[s + 1], h = f[s + 2], g = f[s + 3];
130
+ if ((d | v | h | g) === 0)
131
131
  continue;
132
- const x = (c << 24 | d << 16 | m << 8 | h) >>> 0;
133
- let b = 1;
134
- if (l) {
135
- const R = v % o, E = Math.floor(v / o), k = R - o / 2, L = E - r / 2, T = Math.sqrt(k * k / (o * o) + L * L / (r * r)) / a;
136
- b = Math.exp(-0.5 * T * T);
132
+ const b = (d << 24 | v << 16 | h << 8 | g) >>> 0;
133
+ let R = 1;
134
+ if (c) {
135
+ const y = m % o, B = Math.floor(m / o), U = y - o / 2, L = B - r / 2, N = Math.sqrt(U * U / (o * o) + L * L / (r * r)) / a;
136
+ R = Math.exp(-0.5 * N * N);
137
137
  }
138
- i.set(x, (i.get(x) || 0) + b);
138
+ i.set(b, (i.get(b) || 0) + R);
139
139
  }
140
- return { requests: [...i.entries()].sort((v, g) => g[1] - v[1]).slice(0, t).map(([v]) => ({
141
- x: v >> 22 & 1023,
142
- y: v >> 12 & 1023,
143
- z: v & 4095
140
+ return { requests: Array.from(i.entries()).toSorted((m, s) => s[1] - m[1]).slice(0, t).map(([m]) => ({
141
+ x: m >> 22 & 1023,
142
+ y: m >> 12 & 1023,
143
+ z: m & 4095
144
144
  })), origRequestCount: i.size };
145
145
  }
146
- class Qe {
146
+ class et {
147
147
  constructor(t) {
148
- z("CLASS INITIALIZING"), n.debug("VolumeDataManager constructor", { glParam: t, glParamContext: t.getContext?.() });
148
+ k("CLASS INITIALIZING"), n.debug("VolumeDataManager constructor", { glParam: t, glParamContext: t.getContext?.() });
149
149
  const e = t.getContext?.() || t, i = t;
150
150
  e.domElement && e.getContext ? this.gl = e.getContext() : e.isWebGLRenderer ? this.gl = e.getContext() : this.gl = e, this.renderer = i, (!this.gl || typeof this.gl.getParameter != "function") && (n.debug("Unable to get WebGL context, using mock context"), this.gl = {
151
151
  getParameter: (o) => ({
@@ -222,7 +222,7 @@ class Qe {
222
222
  // l0 z extent
223
223
  zTotal: 0
224
224
  // original z extent plus the l0 z extent times the channel count
225
- }, this.bricksEverLoaded = /* @__PURE__ */ new Set(), this.isBusy = !1, this.BCTimeStamps = new Array(se).fill(0), this.BCMinMax = new Array(se).fill([0, 0]), this.BCFull = !1, this.BCUnusedIndex = 0, this.bc2pt = new Array(se).fill(null), this.LRUStack = [], this.triggerUsage = !0, this.triggerRequest = !1, this.timeStamp = 0, this.k = 40, this.noNewRequests = !1, this.manuallyStopped = !1, this.needsBailout = !1, this.initStatus = V.NOT_STARTED, this.initError = null, this._lastChannelConfig = null, this.currentRequestCount = 0, this.totalBricksRequested = 0, z("VolumeDataManager constructor complete");
225
+ }, this.bricksEverLoaded = /* @__PURE__ */ new Set(), this.isBusy = !1, this.BCTimeStamps = new Array(le).fill(0), this.BCMinMax = new Array(le).fill([0, 0]), this.BCFull = !1, this.BCUnusedIndex = 0, this.bc2pt = new Array(le).fill(null), this.LRUStack = [], this.triggerUsage = !0, this.triggerRequest = !1, this.timeStamp = 0, this.k = 40, this.noNewRequests = !1, this.manuallyStopped = !1, this.needsBailout = !1, this.initStatus = F.NOT_STARTED, this.initError = null, this._lastChannelConfig = null, this.currentRequestCount = 0, this.totalBricksRequested = 0, k("VolumeDataManager constructor complete");
226
226
  }
227
227
  /**
228
228
  * Get loading progress information
@@ -255,7 +255,7 @@ class Qe {
255
255
  * Handle WebGL context loss
256
256
  */
257
257
  _handleContextLost(t) {
258
- z("CONTEXT LOST"), n.warn("WebGL context lost, preventing default and setting flag"), t.preventDefault(), this._isContextLost = !0, this.channels && this.channels.zarrMappings && (this._lastChannelConfig = {
258
+ k("CONTEXT LOST"), n.warn("WebGL context lost, preventing default and setting flag"), t.preventDefault(), this._isContextLost = !0, this.channels && this.channels.zarrMappings && (this._lastChannelConfig = {
259
259
  zarrMappings: [...this.channels.zarrMappings],
260
260
  colorMappings: [...this.channels.colorMappings],
261
261
  downsampleMin: [...this.channels.downsampleMin],
@@ -266,7 +266,7 @@ class Qe {
266
266
  * Handle WebGL context restoration
267
267
  */
268
268
  _handleContextRestored(t) {
269
- if (z("CONTEXT RESTORED"), n.warn("WebGL context restored, reinitializing textures"), this._isContextLost = !1, this._originalGlParam && this._originalGlParam.getContext && (this.gl = this._originalGlParam.getContext()), this._lastChannelConfig && (this.channels.zarrMappings = [...this._lastChannelConfig.zarrMappings], this.channels.colorMappings = [...this._lastChannelConfig.colorMappings], this.channels.downsampleMin = [...this._lastChannelConfig.downsampleMin], this.channels.downsampleMax = [...this._lastChannelConfig.downsampleMax], n.debug("Restored channel configuration after context loss")), this.PT && this.zarrStore && this.zarrStore.brickLayout)
269
+ if (k("CONTEXT RESTORED"), n.warn("WebGL context restored, reinitializing textures"), this._isContextLost = !1, this._originalGlParam && this._originalGlParam.getContext && (this.gl = this._originalGlParam.getContext()), this._lastChannelConfig && (this.channels.zarrMappings = [...this._lastChannelConfig.zarrMappings], this.channels.colorMappings = [...this._lastChannelConfig.colorMappings], this.channels.downsampleMin = [...this._lastChannelConfig.downsampleMin], this.channels.downsampleMax = [...this._lastChannelConfig.downsampleMax], n.debug("Restored channel configuration after context loss")), this.PT && this.zarrStore && this.zarrStore.brickLayout)
270
270
  try {
271
271
  this.initMRMCPT(), n.debug("Successfully reinitialized MRMCPT after context restoration");
272
272
  } catch (e) {
@@ -293,7 +293,7 @@ class Qe {
293
293
  typeof t == "function" && this._contextRestoredCallbacks.push(t);
294
294
  }
295
295
  initImages(t, e) {
296
- z("INIT IMAGES"), this.images = t, this.imageLayerScopes = e;
296
+ k("INIT IMAGES"), this.images = t, this.imageLayerScopes = e;
297
297
  }
298
298
  /**
299
299
  * Initialize the VolumeDataManager with Zarr store details and device limits
@@ -302,8 +302,8 @@ class Qe {
302
302
  * @returns {Promise<Object>} Object with Zarr store details and device limits
303
303
  */
304
304
  async init(t) {
305
- if (z("INIT()"), this.initStatus !== V.NOT_STARTED)
306
- return n.debug("VolumeDataManager init() was called more than once!"), this.initStatus === V.COMPLETE ? {
305
+ if (k("INIT()"), this.initStatus !== F.NOT_STARTED)
306
+ return n.debug("VolumeDataManager init() was called more than once!"), this.initStatus === F.COMPLETE ? {
307
307
  success: !0,
308
308
  deviceLimits: this.deviceLimits,
309
309
  zarrStore: this.zarrStore,
@@ -311,7 +311,7 @@ class Qe {
311
311
  physicalSizeTotal: this.zarrStore.physicalSizeTotal,
312
312
  physicalSizeVoxel: this.zarrStore.physicalSizeVoxel,
313
313
  error: null
314
- } : this.initStatus === V.FAILED ? {
314
+ } : this.initStatus === F.FAILED ? {
315
315
  success: !1,
316
316
  error: this.initError || "Unknown initialization error"
317
317
  } : {
@@ -319,28 +319,28 @@ class Qe {
319
319
  pending: !0,
320
320
  error: "Initialization in progress"
321
321
  };
322
- this.initStatus = V.IN_PROGRESS, z("INIT() IN PROGRESS");
322
+ this.initStatus = F.IN_PROGRESS, k("INIT() IN PROGRESS");
323
323
  try {
324
324
  const e = this.images?.[this.imageLayerScopes?.[0]]?.image?.instance;
325
325
  if (this.ngffMetadata = e.vivLoader.metadata, n.debug("ngffMetadata", this.ngffMetadata), !e || e.getType() !== "ome-zarr")
326
326
  throw new Error("Invalid imageWrapper or not an OME-Zarr image");
327
- const i = e.getMultiResolutionStats(), o = Xe(i), r = i.length;
327
+ const i = e.getMultiResolutionStats(), o = Ye(i), r = i.length;
328
328
  this.zarrStore.resolutions = r;
329
329
  const a = e.getData();
330
330
  if (!Array.isArray(a) || a.length < 1)
331
331
  throw new Error("Not a multiresolution loader");
332
- if (!De(a[0].labels, ["t", "c", "z", "y", "x"]))
332
+ if (!Pe(a[0].labels, ["t", "c", "z", "y", "x"]))
333
333
  throw new Error("Expected OME-Zarr data with dimensions [t, c, z, y, x]");
334
334
  n.debug("vivData", a);
335
- const l = a.map((s) => s._data), u = new Array(r).fill(null);
336
- if (l.length > 0) {
337
- const s = l[0];
335
+ const c = a.map((l) => l._data), u = new Array(r).fill(null);
336
+ if (c.length > 0) {
337
+ const l = c[0];
338
338
  if (this.zarrStore = {
339
339
  resolutions: r,
340
- chunkSize: s.chunks,
340
+ chunkSize: l.chunks,
341
341
  shapes: o,
342
- arrays: l,
343
- dtype: s.dtype,
342
+ arrays: c,
343
+ dtype: l.dtype,
344
344
  physicalSizeTotal: [],
345
345
  // Will be populated if metadata exists
346
346
  physicalSizeVoxel: [],
@@ -351,58 +351,58 @@ class Qe {
351
351
  // group: this.group,
352
352
  channelCount: o[0][1],
353
353
  scales: u
354
- }, this.channels.colorMappings = new Array(Math.min(this.zarrStore.channelCount, 7)).fill(-1), this.channels.zarrMappings = new Array(Math.min(this.zarrStore.channelCount, 7)).fill(void 0), this.channels.downsampleMin = new Array(Math.min(this.zarrStore.channelCount, 7)).fill(void 0), this.channels.downsampleMax = new Array(Math.min(this.zarrStore.channelCount, 7)).fill(void 0), s.meta && s.meta.physicalSizes) {
355
- const { x: d, y: m, z: h } = s.meta.physicalSizes, x = h?.size || 1, b = m?.size || 1, R = d?.size || 1;
356
- this.zarrStore.physicalSizeVoxel = [x, b, R], s.shape && s.shape.length >= 5 && (this.zarrStore.physicalSizeTotal = [
357
- (s.shape[2] || 1) * x,
358
- (s.shape[3] || 1) * b,
359
- (s.shape[4] || 1) * R
354
+ }, this.channels.colorMappings = new Array(Math.min(this.zarrStore.channelCount, 7)).fill(-1), this.channels.zarrMappings = new Array(Math.min(this.zarrStore.channelCount, 7)).fill(void 0), this.channels.downsampleMin = new Array(Math.min(this.zarrStore.channelCount, 7)).fill(void 0), this.channels.downsampleMax = new Array(Math.min(this.zarrStore.channelCount, 7)).fill(void 0), l.meta && l.meta.physicalSizes) {
355
+ const { x: d, y: v, z: h } = l.meta.physicalSizes, g = h?.size || 1, b = v?.size || 1, R = d?.size || 1;
356
+ this.zarrStore.physicalSizeVoxel = [g, b, R], l.shape && l.shape.length >= 5 && (this.zarrStore.physicalSizeTotal = [
357
+ (l.shape[2] || 1) * g,
358
+ (l.shape[3] || 1) * b,
359
+ (l.shape[4] || 1) * R
360
360
  ]);
361
361
  } else
362
362
  this.zarrStore.physicalSizeVoxel = [1, 1, 1], this.zarrStore.physicalSizeTotal = [
363
- s.shape[2] || 1,
364
- s.shape[3] || 1,
365
- s.shape[4] || 1
363
+ l.shape[2] || 1,
364
+ l.shape[3] || 1,
365
+ l.shape[4] || 1
366
366
  ];
367
- const { multiscales: v } = this.ngffMetadata;
368
- if (!v)
367
+ const { multiscales: p } = this.ngffMetadata;
368
+ if (!p)
369
369
  throw new Error("Expected multiscales metadata in group.attrs");
370
- if (v?.[0]?.datasets?.[0]?.coordinateTransformations) {
370
+ if (p?.[0]?.datasets?.[0]?.coordinateTransformations) {
371
371
  for (let d = 0; d < r; d++)
372
- if (v?.[0]?.datasets?.[d]?.coordinateTransformations?.[0]?.scale) {
373
- const { scale: m } = v[0].datasets[d].coordinateTransformations[0];
374
- u[d] = [m[4], m[3], m[2]];
372
+ if (p?.[0]?.datasets?.[d]?.coordinateTransformations?.[0]?.scale) {
373
+ const { scale: v } = p[0].datasets[d].coordinateTransformations[0];
374
+ u[d] = [v[4], v[3], v[2]];
375
375
  }
376
376
  } else {
377
377
  n.error("no coordinateTransformations available, assuming downsampling ratio of 2 per dimension");
378
378
  for (let d = 0; d < r; d++) {
379
- const m = 2 ** d;
380
- u[d] = [m, m, m];
379
+ const v = 2 ** d;
380
+ u[d] = [v, v, v];
381
381
  }
382
382
  }
383
383
  this.zarrStore.scales = u;
384
- const { coordinateTransformations: g } = this.ngffMetadata;
385
- if (g?.[0]?.scale) {
386
- const { scale: d } = g[0], m = d.length;
387
- if (m >= 3) {
388
- const h = d[m - 3], x = d[m - 2], b = d[m - 1];
389
- this.zarrStore.physicalSizeVoxel = [h, x, b], s.shape && s.shape.length >= 5 && (this.zarrStore.physicalSizeTotal = [
390
- (s.shape[2] || 1) * h,
391
- (s.shape[3] || 1) * x,
392
- (s.shape[4] || 1) * b
384
+ const { coordinateTransformations: m } = this.ngffMetadata;
385
+ if (m?.[0]?.scale) {
386
+ const { scale: d } = m[0], v = d.length;
387
+ if (v >= 3) {
388
+ const h = d[v - 3], g = d[v - 2], b = d[v - 1];
389
+ this.zarrStore.physicalSizeVoxel = [h, g, b], l.shape && l.shape.length >= 5 && (this.zarrStore.physicalSizeTotal = [
390
+ (l.shape[2] || 1) * h,
391
+ (l.shape[3] || 1) * g,
392
+ (l.shape[4] || 1) * b
393
393
  ]);
394
394
  }
395
395
  }
396
- this.zarrStore.brickLayout = je(e.getMultiResolutionStats()), n.debug("config", t);
397
- const { omero: c } = this.ngffMetadata || {};
398
- if (!c)
396
+ this.zarrStore.brickLayout = He(e.getMultiResolutionStats()), n.debug("config", t);
397
+ const { omero: s } = this.ngffMetadata || {};
398
+ if (!s)
399
399
  throw new Error("Expected omero metadata in ngffMetadata");
400
- n.debug("omero", c), Object.keys(t).forEach((d, m) => {
400
+ n.debug("omero", s), Object.keys(t).forEach((d, v) => {
401
401
  const h = t[d].spatialTargetC;
402
- this.channels.zarrMappings[m] = h, this.channels.colorMappings[m] = m, this.channels.downsampleMin[m] = c?.channels?.[h]?.window?.min || 0, this.channels.downsampleMax[m] = c?.channels?.[h]?.window?.max || 65535;
402
+ this.channels.zarrMappings[v] = h, this.channels.colorMappings[v] = v, this.channels.downsampleMin[v] = s?.channels?.[h]?.window?.min || 0, this.channels.downsampleMax[v] = s?.channels?.[h]?.window?.max || 65535;
403
403
  }), n.debug("zarrMappings after init", this.channels.zarrMappings), n.debug("colorMappings after init", this.channels.colorMappings), n.debug("downsampleMin after init", this.channels.downsampleMin), n.debug("downsampleMax after init", this.channels.downsampleMax), this.initMRMCPT();
404
404
  }
405
- return this.initStatus = V.COMPLETE, z("INIT() COMPLETE"), {
405
+ return this.initStatus = F.COMPLETE, k("INIT() COMPLETE"), {
406
406
  success: !0,
407
407
  deviceLimits: this.deviceLimits,
408
408
  zarrStore: this.zarrStore,
@@ -412,7 +412,7 @@ class Qe {
412
412
  error: null
413
413
  };
414
414
  } catch (e) {
415
- return z("INIT() FAILED"), n.error("Error initializing VolumeDataManager:", e), this.initStatus = V.FAILED, this.initError = e.message || "Unknown error", {
415
+ return k("INIT() FAILED"), n.error("Error initializing VolumeDataManager:", e), this.initStatus = F.FAILED, this.initError = e.message || "Unknown error", {
416
416
  success: !1,
417
417
  error: this.initError
418
418
  };
@@ -428,51 +428,51 @@ class Qe {
428
428
  * -
429
429
  */
430
430
  initMRMCPT() {
431
- z("initMRMCPT");
432
- const { PT: t, ptTHREE: e, bcTHREE: i } = Ye(this.zarrStore.brickLayout, this.channels.zarrMappings.length);
433
- this.PT = t, this.ptTHREE = e, this.bcTHREE = i, z("initMRMCPT() COMPLETE");
431
+ k("initMRMCPT");
432
+ const { PT: t, ptTHREE: e, bcTHREE: i } = Ke(this.zarrStore.brickLayout, this.channels.zarrMappings.length);
433
+ this.PT = t, this.ptTHREE = e, this.bcTHREE = i, k("initMRMCPT() COMPLETE");
434
434
  }
435
435
  async initTexture() {
436
436
  const t = [
437
437
  { x: 0, y: 0, z: 1 }
438
438
  ];
439
- z("initTexture - loading first brick"), await this.handleBrickRequests(t);
439
+ k("initTexture - loading first brick"), await this.handleBrickRequests(t);
440
440
  }
441
441
  updateChannels(t) {
442
- if (z("updateChannels"), n.debug("channelProps", t), n.debug("this.channels.zarrMappings", this.channels.zarrMappings), n.debug("this.channels.colorMappings", this.channels.colorMappings), n.debug("this.channels.downsampleMin", this.channels.downsampleMin), n.debug("this.channels.downsampleMax", this.channels.downsampleMax), this.channels.zarrMappings.length === 0) {
442
+ if (k("updateChannels"), n.debug("channelProps", t), n.debug("this.channels.zarrMappings", this.channels.zarrMappings), n.debug("this.channels.colorMappings", this.channels.colorMappings), n.debug("this.channels.downsampleMin", this.channels.downsampleMin), n.debug("this.channels.downsampleMax", this.channels.downsampleMax), this.channels.zarrMappings.length === 0) {
443
443
  n.debug("channels not initialized yet");
444
444
  return;
445
445
  }
446
- const e = Object.values(t).map((l) => l.spatialTargetC).filter((l) => l !== void 0), i = this.channels.zarrMappings.filter((l) => l !== void 0), o = [...new Set(e)].sort((l, u) => l - u), r = [...new Set(i)].sort((l, u) => l - u);
447
- o.length === r.length && o.every((l, u) => l === r[u]) && n.debug("Channel mappings unchanged, skipping update"), n.debug("Channel mappings changed:", {
446
+ const e = Object.values(t).map((c) => c.spatialTargetC).filter((c) => c !== void 0), i = this.channels.zarrMappings.filter((c) => c !== void 0), o = [...new Set(e)].sort((c, u) => c - u), r = [...new Set(i)].sort((c, u) => c - u);
447
+ o.length === r.length && o.every((c, u) => c === r[u]) && n.debug("Channel mappings unchanged, skipping update"), n.debug("Channel mappings changed:", {
448
448
  current: r,
449
449
  requested: o
450
- }), Object.entries(t).forEach(([l, u]) => {
451
- const s = u.spatialTargetC;
452
- n.debug(`UI channel "${l}" wants zarr channel ${s}`);
453
- const v = this.channels.zarrMappings.indexOf(s);
454
- if (v === -1) {
455
- const g = this.channels.zarrMappings.findIndex((c) => c === void 0);
456
- if (g !== -1)
457
- this.channels.zarrMappings[g] = s, n.debug("channelData", u), n.debug("this.ngffMetadata?.omero?.channels", this.ngffMetadata?.omero?.channels), n.debug("targetZarrChannel", s), this.channels.downsampleMin[g] = this.ngffMetadata?.omero?.channels?.[s]?.window?.min || 0, this.channels.downsampleMax[g] = this.ngffMetadata?.omero?.channels?.[s]?.window?.max || 65535, n.debug(`Mapped zarr channel ${s} to slot ${g}`), n.debug("channels", this.channels);
450
+ }), Object.entries(t).forEach(([c, u]) => {
451
+ const l = u.spatialTargetC;
452
+ n.debug(`UI channel "${c}" wants zarr channel ${l}`);
453
+ const p = this.channels.zarrMappings.indexOf(l);
454
+ if (p === -1) {
455
+ const m = this.channels.zarrMappings.findIndex((s) => s === void 0);
456
+ if (m !== -1)
457
+ this.channels.zarrMappings[m] = l, n.debug("channelData", u), n.debug("this.ngffMetadata?.omero?.channels", this.ngffMetadata?.omero?.channels), n.debug("targetZarrChannel", l), this.channels.downsampleMin[m] = this.ngffMetadata?.omero?.channels?.[l]?.window?.min || 0, this.channels.downsampleMax[m] = this.ngffMetadata?.omero?.channels?.[l]?.window?.max || 65535, n.debug(`Mapped zarr channel ${l} to slot ${m}`), n.debug("channels", this.channels);
458
458
  else {
459
459
  n.debug("No free slots found, looking for unused mapped channels");
460
- const c = this.channels.zarrMappings.filter((h) => h !== void 0), d = e, m = c.filter((h) => !d.includes(h));
461
- if (n.debug("Currently mapped:", c), n.debug("Still requested:", d), n.debug("Unused mapped channels:", m), m.length > 0) {
462
- const h = this.channels.zarrMappings.findIndex((x) => m.includes(x));
460
+ const s = this.channels.zarrMappings.filter((h) => h !== void 0), d = e, v = s.filter((h) => !d.includes(h));
461
+ if (n.debug("Currently mapped:", s), n.debug("Still requested:", d), n.debug("Unused mapped channels:", v), v.length > 0) {
462
+ const h = this.channels.zarrMappings.findIndex((g) => v.includes(g));
463
463
  if (h !== -1) {
464
- const x = this.channels.zarrMappings[h];
465
- this.channels.zarrMappings[h] = s, this.channels.downsampleMin[h] = this.ngffMetadata?.omero?.channels?.[s]?.window?.min || 0, this.channels.downsampleMax[h] = this.ngffMetadata?.omero?.channels?.[s]?.window?.max || 65535, n.debug(`Reused slot ${h}: ${x} -> ${s}`), this._purgeChannel(h);
464
+ const g = this.channels.zarrMappings[h];
465
+ this.channels.zarrMappings[h] = l, this.channels.downsampleMin[h] = this.ngffMetadata?.omero?.channels?.[l]?.window?.min || 0, this.channels.downsampleMax[h] = this.ngffMetadata?.omero?.channels?.[l]?.window?.max || 65535, n.debug(`Reused slot ${h}: ${g} -> ${l}`), this._purgeChannel(h);
466
466
  } else
467
467
  n.error("Could not find slot to reuse - this should not happen");
468
468
  } else
469
469
  n.error("All slots are full and all mapped channels are still in use");
470
470
  }
471
471
  } else
472
- n.debug(`Zarr channel ${s} already mapped to slot ${v}`);
472
+ n.debug(`Zarr channel ${l} already mapped to slot ${p}`);
473
473
  });
474
- const a = Object.values(t).map((l) => {
475
- const u = this.channels.zarrMappings.indexOf(l.spatialTargetC);
474
+ const a = Object.values(t).map((c) => {
475
+ const u = this.channels.zarrMappings.indexOf(c.spatialTargetC);
476
476
  return u !== -1 ? u : -1;
477
477
  });
478
478
  for (; a.length < 7; )
@@ -536,7 +536,7 @@ class Qe {
536
536
  return n.debug("out", t), t;
537
537
  }
538
538
  getOriginalScaleXYZ() {
539
- z("getOriginalScaleXYZ"), n.debug("this.zarrStore.physicalSizeVoxel", this.zarrStore.physicalSizeVoxel);
539
+ k("getOriginalScaleXYZ"), n.debug("this.zarrStore.physicalSizeVoxel", this.zarrStore.physicalSizeVoxel);
540
540
  const t = [
541
541
  this.zarrStore.physicalSizeVoxel[2],
542
542
  this.zarrStore.physicalSizeVoxel[1],
@@ -579,7 +579,7 @@ class Qe {
579
579
  const u = await this.zarrStore.arrays[a].getChunk([t, e, i, o, r]);
580
580
  if (!u)
581
581
  throw new Error(`No chunk found at coordinates [${t},${e},${i},${o},${r}]`);
582
- if (u.data.length !== S * S * S)
582
+ if (u.data.length !== w * w * w)
583
583
  throw new Error(`Unexpected chunk size: ${u.data.length}`);
584
584
  return u.data;
585
585
  }
@@ -596,6 +596,10 @@ class Qe {
596
596
  * the center of the render target.
597
597
  */
598
598
  async processRequestData(t, e) {
599
+ if (this.initStatus !== F.COMPLETE) {
600
+ n.debug("processRequestData: not yet initialized, skipping");
601
+ return;
602
+ }
599
603
  if (this.isBusy) {
600
604
  n.debug("processRequestData: already busy, skipping");
601
605
  return;
@@ -609,7 +613,7 @@ class Qe {
609
613
  return;
610
614
  }
611
615
  this.isBusy = !0, this.triggerRequest = !1;
612
- const { requests: i, origRequestCount: o } = $e(t, this.k, e);
616
+ const { requests: i, origRequestCount: o } = Je(t, this.k, e);
613
617
  i.length === 0 && (this.noNewRequests = !0), n.debug(`processRequestData: handling ${i.length} requests of ${o}`), await this.handleBrickRequests(i), this.triggerUsage = !0, this.isBusy = !1;
614
618
  }
615
619
  async processUsageData(t) {
@@ -624,10 +628,10 @@ class Qe {
624
628
  this.isBusy = !0, this.triggerUsage = !1;
625
629
  const e = ++this.timeStamp, i = /* @__PURE__ */ new Set();
626
630
  for (let o = 0; o < t.length; o += 4) {
627
- const r = t[o], a = t[o + 1], l = t[o + 2];
628
- if ((r | a | l) === 0)
631
+ const r = t[o], a = t[o + 1], c = t[o + 2];
632
+ if ((r | a | c) === 0)
629
633
  continue;
630
- const u = l * B * G + a * B + r;
634
+ const u = c * A * q + a * A + r;
631
635
  u < this.BCTimeStamps.length && i.add(u);
632
636
  }
633
637
  Array.from(i).forEach((o) => {
@@ -663,8 +667,8 @@ class Qe {
663
667
  this.PT.anchors[r][0] * e[0]
664
668
  ];
665
669
  n.debug("anchor", a);
666
- const l = this.zarrStore.brickLayout[r], u = l[0] * l[1] * l[2];
667
- n.debug("extents", l), n.debug("size", u), i.texSubImage3D(i.TEXTURE_3D, 0, a[0], a[1], a[2], l[0], l[1], l[2], i.RED_INTEGER, i.UNSIGNED_INT, new Uint32Array(u));
670
+ const c = this.zarrStore.brickLayout[r], u = c[0] * c[1] * c[2];
671
+ n.debug("extents", c), n.debug("size", u), i.texSubImage3D(i.TEXTURE_3D, 0, a[0], a[1], a[2], c[0], c[1], c[2], i.RED_INTEGER, i.UNSIGNED_INT, new Uint32Array(u));
668
672
  }
669
673
  i.bindTexture(i.TEXTURE_3D, null);
670
674
  }
@@ -689,17 +693,17 @@ class Qe {
689
693
  */
690
694
  _allocateBCSlots(t) {
691
695
  let e = [];
692
- const i = B * G * ue;
696
+ const i = A * q * he;
693
697
  if (!this.BCFull && this.BCUnusedIndex + t > i && (this.BCFull = !0, n.debug("BRICK CACHE FULL")), this.BCFull)
694
698
  this.LRUStack.length < t && this._buildLRU(), e = this.LRUStack.splice(0, t).map((o) => {
695
699
  this._evictBrick(o);
696
- const r = Math.floor(o / (B * G)), a = o - r * B * G, l = Math.floor(a / B), u = a % B;
697
- return { bcIndex: o, x: u, y: l, z: r };
700
+ const r = Math.floor(o / (A * q)), a = o - r * A * q, c = Math.floor(a / A), u = a % A;
701
+ return { bcIndex: o, x: u, y: c, z: r };
698
702
  });
699
703
  else {
700
704
  for (let o = 0; o < t; ++o) {
701
- const r = (this.BCUnusedIndex + o) % i, a = Math.floor(r / (B * G)), l = r - a * B * G, u = Math.floor(l / B), s = l % B;
702
- e.push({ bcIndex: r, x: s, y: u, z: a });
705
+ const r = (this.BCUnusedIndex + o) % i, a = Math.floor(r / (A * q)), c = r - a * A * q, u = Math.floor(c / A), l = c % A;
706
+ e.push({ bcIndex: r, x: l, y: u, z: a });
703
707
  }
704
708
  this.BCUnusedIndex += t;
705
709
  }
@@ -717,7 +721,7 @@ class Qe {
717
721
  n.error("this.PT", this.PT), n.error("ptCoord out of bounds", t);
718
722
  return;
719
723
  }
720
- const { channel: i, resolution: o, x: r, y: a, z: l } = Ke(t.x, t.y, t.z, { PT_zExtent: this.PT.zExtent, PT_z0Extent: this.PT.z0Extent, PT_anchors: this.PT.anchors });
724
+ const { channel: i, resolution: o, x: r, y: a, z: c } = $e(t.x, t.y, t.z, { PT_zExtent: this.PT.zExtent, PT_z0Extent: this.PT.z0Extent, PT_anchors: this.PT.anchors });
721
725
  if (!this.channels || !this.channels.zarrMappings || this.channels.zarrMappings.length === 0) {
722
726
  n.error("Channel mappings not initialized, skipping brick upload");
723
727
  return;
@@ -747,35 +751,35 @@ class Qe {
747
751
  n.error("No fallback channel config available, aborting brick upload");
748
752
  return;
749
753
  }
750
- n.debug("starting to load zarr chunk", { resolution: o, z: l, y: a, x: r, zarrChannel: u });
751
- let s = await this.loadZarrChunk(0, u, l, a, r, o);
752
- if (n.debug("chunk", s), s instanceof Uint16Array) {
754
+ n.debug("starting to load zarr chunk", { resolution: o, z: c, y: a, x: r, zarrChannel: u });
755
+ let l = await this.loadZarrChunk(0, u, c, a, r, o);
756
+ if (n.debug("chunk", l), l instanceof Uint16Array) {
753
757
  if (n.debug("chunk is Uint16Array, converting to Uint8Array"), this.channels.downsampleMin[i] === void 0) {
754
758
  const T = this.channels.zarrMappings[i];
755
759
  n.debug("channelId was not found in this.channels.downsampleMin[channel]", T), this.channels.downsampleMin[i] = this.ngffMetadata?.omero?.channels?.[T]?.window?.min || 0, this.channels.downsampleMax[i] = this.ngffMetadata?.omero?.channels?.[T]?.window?.max || 65535, n.debug("this.channels.downsampleMin[channel]", this.channels.downsampleMin[i]), n.debug("this.channels.downsampleMax[channel]", this.channels.downsampleMax[i]);
756
760
  }
757
- const R = new Uint16Array(s.buffer), E = new Uint8Array(s.length), k = this.channels.downsampleMin[i], L = this.channels.downsampleMax[i], X = L - k;
761
+ const R = new Uint16Array(l.buffer), y = new Uint8Array(l.length), B = this.channels.downsampleMin[i], U = this.channels.downsampleMax[i], L = U - B;
758
762
  for (let T = 0; T < R.length; T++) {
759
- const U = R[T], N = Math.max(k, Math.min(L, U));
760
- E[T] = (N - k) * 255 / X | 0;
763
+ const N = R[T], G = Math.max(B, Math.min(U, N));
764
+ y[T] = (G - B) * 255 / L | 0;
761
765
  }
762
- s = E;
766
+ l = y;
763
767
  }
764
- if (!(s instanceof Uint8Array))
765
- throw new Error(`Unsupported chunk type: ${s.constructor.name}. Expected Uint8Array.`);
766
- let v = 255, g = 0;
767
- for (let R = 0; R < s.length; ++R) {
768
- const E = s[R];
769
- E < v && (v = E), E > g && (g = E);
768
+ if (!(l instanceof Uint8Array))
769
+ throw new Error(`Unsupported chunk type: ${l.constructor.name}. Expected Uint8Array.`);
770
+ let p = 255, m = 0;
771
+ for (let R = 0; R < l.length; ++R) {
772
+ const y = l[R];
773
+ y < p && (p = y), y > m && (m = y);
770
774
  }
771
- const { gl: c } = this, d = this.renderer.properties.get(this.bcTHREE).__webglTexture;
772
- c.activeTexture(c.TEXTURE2), c.bindTexture(c.TEXTURE_3D, d), c.pixelStorei(c.UNPACK_ALIGNMENT, 1), c.texSubImage3D(c.TEXTURE_3D, 0, e.x * S, e.y * S, e.z * S, S, S, S, c.RED, c.UNSIGNED_BYTE, s), c.pixelStorei(c.UNPACK_ALIGNMENT, 4), c.bindTexture(c.TEXTURE_3D, null);
773
- const m = c.getError();
774
- m !== c.NO_ERROR && n.error("WebGL error during brick upload:", m, s), i >= this.channels.zarrMappings.length && (n.debug("channel is out of bounds", i), v = 255, g = 255);
775
- const h = He(v, g, e.x, e.y, e.z), x = this.renderer.properties.get(this.ptTHREE).__webglTexture;
776
- c.activeTexture(c.TEXTURE0), c.bindTexture(c.TEXTURE_3D, x), c.texSubImage3D(c.TEXTURE_3D, 0, t.x, t.y, t.z, 1, 1, 1, c.RED_INTEGER, c.UNSIGNED_INT, new Uint32Array([h])), c.bindTexture(c.TEXTURE_3D, null);
777
- const b = c.getError();
778
- b !== c.NO_ERROR && n.error("WebGL error during pagetable upload:", b, s), this.BCTimeStamps[e.bcIndex] = this.timeStamp, this.BCMinMax[e.bcIndex] = [v, g], this.bc2pt[e.bcIndex] = t;
775
+ const { gl: s } = this, d = this.renderer.properties.get(this.bcTHREE).__webglTexture;
776
+ s.activeTexture(s.TEXTURE2), s.bindTexture(s.TEXTURE_3D, d), s.pixelStorei(s.UNPACK_ALIGNMENT, 1), s.texSubImage3D(s.TEXTURE_3D, 0, e.x * w, e.y * w, e.z * w, w, w, w, s.RED, s.UNSIGNED_BYTE, l), s.pixelStorei(s.UNPACK_ALIGNMENT, 4), s.bindTexture(s.TEXTURE_3D, null);
777
+ const v = s.getError();
778
+ v !== s.NO_ERROR && n.error("WebGL error during brick upload:", v, l), i >= this.channels.zarrMappings.length && (n.debug("channel is out of bounds", i), p = 255, m = 255);
779
+ const h = We(p, m, e.x, e.y, e.z), g = this.renderer.properties.get(this.ptTHREE).__webglTexture;
780
+ s.activeTexture(s.TEXTURE0), s.bindTexture(s.TEXTURE_3D, g), s.texSubImage3D(s.TEXTURE_3D, 0, t.x, t.y, t.z, 1, 1, 1, s.RED_INTEGER, s.UNSIGNED_INT, new Uint32Array([h])), s.bindTexture(s.TEXTURE_3D, null);
781
+ const b = s.getError();
782
+ b !== s.NO_ERROR && n.error("WebGL error during pagetable upload:", b, l), this.BCTimeStamps[e.bcIndex] = this.timeStamp, this.BCMinMax[e.bcIndex] = [p, m], this.bc2pt[e.bcIndex] = t;
779
783
  }
780
784
  /* ------------------------------------------------------------- *
781
785
  * 5. Public: handle a batch of PT requests (array of {x,y,z}) *
@@ -804,7 +808,7 @@ class Qe {
804
808
  this.LRUStack = t.sort((e, i) => e.time - i.time).slice(0, this.k).map((e) => e.index);
805
809
  }
806
810
  }
807
- const Je = `//
811
+ const tt = `//
808
812
  // Output: Unnormalized ray direction from camera to each vertex
809
813
  // Used by fragment shader for ray marching through the volume
810
814
  out vec3 rayDirUnnorm;
@@ -863,7 +867,7 @@ void main()
863
867
  // Pass through texture coordinates for volume sampling
864
868
  vUv = uv;
865
869
  }
866
- `, et = `//
870
+ `, nt = `//
867
871
  // #include <packing>
868
872
  precision highp float;
869
873
  precision highp int;
@@ -2428,7 +2432,7 @@ void main(void) {
2428
2432
  outColor.a);
2429
2433
 
2430
2434
  }
2431
- `, tt = {
2435
+ `, rt = {
2432
2436
  uniforms: {
2433
2437
  u_size: { value: new C(1, 1, 1) },
2434
2438
  clim0: { value: new _(0.2, 0.8) },
@@ -2448,13 +2452,13 @@ void main(void) {
2448
2452
  u_renderstyle: { value: 2 },
2449
2453
  brickCacheTex: { type: "sampler3D", value: null },
2450
2454
  pageTableTex: { type: "usampler3D", value: null },
2451
- color0: { value: new Z(0, 0, 0) },
2452
- color1: { value: new Z(0, 0, 0) },
2453
- color2: { value: new Z(0, 0, 0) },
2454
- color3: { value: new Z(0, 0, 0) },
2455
- color4: { value: new Z(0, 0, 0) },
2456
- color5: { value: new Z(0, 0, 0) },
2457
- color6: { value: new Z(0, 0, 0) },
2455
+ color0: { value: new j(0, 0, 0) },
2456
+ color1: { value: new j(0, 0, 0) },
2457
+ color2: { value: new j(0, 0, 0) },
2458
+ color3: { value: new j(0, 0, 0) },
2459
+ color4: { value: new j(0, 0, 0) },
2460
+ color5: { value: new j(0, 0, 0) },
2461
+ color6: { value: new j(0, 0, 0) },
2458
2462
  channelMapping: {
2459
2463
  value: [-1, -1, -1, -1, -1, -1, -1]
2460
2464
  },
@@ -2496,24 +2500,24 @@ void main(void) {
2496
2500
  scale8: { value: new C(256, 256, 256) },
2497
2501
  scale9: { value: new C(512, 512, 512) }
2498
2502
  },
2499
- vertexShader: Je,
2500
- fragmentShader: et
2503
+ vertexShader: tt,
2504
+ fragmentShader: nt
2501
2505
  };
2502
- function A(f) {
2503
- le(ce.DEBUG) && console.warn(`%cRM: ${f}`, "background: orange; color: white; padding: 2px; border-radius: 3px;");
2506
+ function P(f) {
2507
+ ce(ue.DEBUG) && console.warn(`%cRM: ${f}`, "background: orange; color: white; padding: 2px; border-radius: 3px;");
2504
2508
  }
2505
- function re(f, t) {
2509
+ function ie(f, t) {
2506
2510
  return f / t[1];
2507
2511
  }
2508
- class nt {
2512
+ class it {
2509
2513
  constructor() {
2510
- A("Initializing VolumeRenderManager"), this.uniforms = null, this.shader = null, this.meshScale = [1, 1, 1], this.geometrySize = [1, 1, 1], this.boxSize = [1, 1, 1], this.zarrInit = !1, this.channelsVisible = [], this.channelTargetC = [], this.zarrStoreNumResolutions = null, this.channelMaxResolutionIndex = [], this.colors = [], this.contrastLimits = [], this.layerTransparency = 1, this.xSlice = new _(-1, 1e5), this.ySlice = new _(-1, 1e5), this.zSlice = new _(-1, 1e5), this.originalScale = [1, 1, 1], this.physicalDimensions = [1, 1, 1], this.maxResolution = [1, 1, 1], this.maxRange = 255, this.maxRangeSet = !1, this.initializeShader();
2514
+ P("Initializing VolumeRenderManager"), this.uniforms = null, this.shader = null, this.meshScale = [1, 1, 1], this.geometrySize = [1, 1, 1], this.boxSize = [1, 1, 1], this.zarrInit = !1, this.channelsVisible = [], this.channelTargetC = [], this.zarrStoreNumResolutions = null, this.channelMaxResolutionIndex = [], this.colors = [], this.contrastLimits = [], this.layerTransparency = 1, this.xSlice = new _(-1, 1e5), this.ySlice = new _(-1, 1e5), this.zSlice = new _(-1, 1e5), this.originalScale = [1, 1, 1], this.physicalDimensions = [1, 1, 1], this.maxResolution = [1, 1, 1], this.maxRange = 255, this.maxRangeSet = !1, this.initializeShader();
2511
2515
  }
2512
2516
  /**
2513
2517
  * Initialize shader and uniform objects
2514
2518
  */
2515
2519
  initializeShader() {
2516
- A("Initializing shader"), this.shader = tt, this.uniforms = Be.clone(this.shader.uniforms);
2520
+ P("Initializing shader"), this.shader = rt, this.uniforms = Ue.clone(this.shader.uniforms);
2517
2521
  }
2518
2522
  /**
2519
2523
  * Extract rendering settings from coordination props
@@ -2521,61 +2525,61 @@ class nt {
2521
2525
  * @returns {Object} Extracted rendering settings
2522
2526
  */
2523
2527
  extractRenderingSettingsFromProps(t) {
2524
- const { images: e = {}, imageLayerScopes: i = [], imageLayerCoordination: o = [{}], imageChannelScopesByLayer: r = {}, imageChannelCoordination: a = [{}], spatialRenderingMode: l } = t, u = i[0];
2528
+ const { images: e = {}, imageLayerScopes: i = [], imageLayerCoordination: o = [{}], imageChannelScopesByLayer: r = {}, imageChannelCoordination: a = [{}], spatialRenderingMode: c } = t, u = i[0];
2525
2529
  if (!u)
2526
- return A("Extracting rendering settings from props - no layer scope"), {
2530
+ return P("Extracting rendering settings from props - no layer scope"), {
2527
2531
  valid: !1
2528
2532
  };
2529
- const s = r[u], v = o[0][u], g = a[0][u], c = e[u]?.image?.instance?.getData();
2530
- if (!c)
2531
- return A("Extracting rendering settings from props - no image data"), {
2533
+ const l = r[u], p = o[0][u], m = a[0][u], s = e[u]?.image?.instance?.getData();
2534
+ if (!s)
2535
+ return P("Extracting rendering settings from props - no image data"), {
2532
2536
  valid: !1
2533
2537
  };
2534
- if (!g[s?.[0]][P.SPATIAL_CHANNEL_WINDOW])
2535
- return A("Extracting rendering settings from props - no channel window set"), {
2538
+ if (!m[l?.[0]][M.SPATIAL_CHANNEL_WINDOW])
2539
+ return P("Extracting rendering settings from props - no channel window set"), {
2536
2540
  valid: !1
2537
2541
  };
2538
- const d = e[u].image.instance, m = l === "3D", h = v[P.PHOTOMETRIC_INTERPRETATION] === "RGB", x = v[P.SPATIAL_LAYER_VISIBLE], b = v[P.SPATIAL_LAYER_OPACITY], R = h ? [
2542
+ const d = e[u].image.instance, v = c === "3D", h = p[M.PHOTOMETRIC_INTERPRETATION] === "RGB", g = p[M.SPATIAL_LAYER_VISIBLE], b = p[M.SPATIAL_LAYER_OPACITY], R = h ? [
2539
2543
  [255, 0, 0],
2540
2544
  [0, 255, 0],
2541
2545
  [0, 0, 255]
2542
- ] : s.map((I) => g[I][P.SPATIAL_CHANNEL_COLOR]), E = h ? [
2546
+ ] : l.map((S) => m[S][M.SPATIAL_CHANNEL_COLOR]), y = h ? [
2543
2547
  [0, 255],
2544
2548
  [0, 255],
2545
2549
  [0, 255]
2546
- ] : s.map((I) => g[I][P.SPATIAL_CHANNEL_WINDOW] || [0, 255]);
2547
- this.maxRangeSet || (this.maxRange = Math.max(...E.map((I) => I[1])), this.maxRangeSet = !0);
2548
- const k = h ? [
2549
- x && !0,
2550
- x && !0,
2551
- x && !0
2552
- ] : s.map((I) => x && g[I][P.SPATIAL_CHANNEL_VISIBLE]), L = h ? [
2553
- x && !0,
2554
- x && !0,
2555
- x && !0
2556
- ] : s.map((I) => x && d.getChannelIndex(g[I][P.SPATIAL_TARGET_C])), X = h ? [
2557
- x && null,
2558
- x && null,
2559
- x && null
2560
- ] : s.map((I) => g[I][P.SPATIAL_MAX_RESOLUTION]);
2561
- let T = v[P.SPATIAL_SLICE_X], U = v[P.SPATIAL_SLICE_Y], N = v[P.SPATIAL_SLICE_Z];
2562
- const Y = v[P.SPATIAL_LOD_FACTOR] ?? 1;
2563
- T = T !== null ? T : new _(-1, 1e5), U = U !== null ? U : new _(-1, 1e5), N = N !== null ? N : new _(-1, 1e5);
2564
- const oe = e[u].image.loaders[0].channels;
2565
- return A("Extracting rendering settings from props - success"), {
2550
+ ] : l.map((S) => m[S][M.SPATIAL_CHANNEL_WINDOW] || [0, 255]);
2551
+ this.maxRangeSet || (this.maxRange = Math.max(...y.map((S) => S[1])), this.maxRangeSet = !0);
2552
+ const B = h ? [
2553
+ g && !0,
2554
+ g && !0,
2555
+ g && !0
2556
+ ] : l.map((S) => g && m[S][M.SPATIAL_CHANNEL_VISIBLE]), U = h ? [
2557
+ g && !0,
2558
+ g && !0,
2559
+ g && !0
2560
+ ] : l.map((S) => g && d.getChannelIndex(m[S][M.SPATIAL_TARGET_C])), L = h ? [
2561
+ g && null,
2562
+ g && null,
2563
+ g && null
2564
+ ] : l.map((S) => m[S][M.SPATIAL_MAX_RESOLUTION]);
2565
+ let T = p[M.SPATIAL_SLICE_X], N = p[M.SPATIAL_SLICE_Y], G = p[M.SPATIAL_SLICE_Z];
2566
+ const Y = p[M.SPATIAL_LOD_FACTOR] ?? 1;
2567
+ T = T !== null ? T : new _(-1, 1e5), N = N !== null ? N : new _(-1, 1e5), G = G !== null ? G : new _(-1, 1e5);
2568
+ const Z = e[u].image.loaders[0].channels;
2569
+ return P("Extracting rendering settings from props - success"), {
2566
2570
  valid: !0,
2567
- channelsVisible: k,
2568
- allChannels: oe,
2569
- channelTargetC: L,
2570
- channelMaxResolutionIndex: X,
2571
- data: c,
2571
+ channelsVisible: B,
2572
+ allChannels: Z,
2573
+ channelTargetC: U,
2574
+ channelMaxResolutionIndex: L,
2575
+ data: s,
2572
2576
  colors: R,
2573
- contrastLimits: E,
2574
- is3dMode: m,
2577
+ contrastLimits: y,
2578
+ is3dMode: v,
2575
2579
  layerTransparency: b,
2576
2580
  xSlice: T,
2577
- ySlice: U,
2578
- zSlice: N,
2581
+ ySlice: N,
2582
+ zSlice: G,
2579
2583
  lodFactor: Y
2580
2584
  };
2581
2585
  }
@@ -2586,59 +2590,59 @@ class nt {
2586
2590
  */
2587
2591
  updateFromProps(t) {
2588
2592
  const e = this.extractRenderingSettingsFromProps(t);
2589
- return e.valid ? (this.channelsVisible = e.channelsVisible, this.channelTargetC = e.channelTargetC, this.channelMaxResolutionIndex = e.channelMaxResolutionIndex, this.colors = e.colors, this.contrastLimits = e.contrastLimits, this.renderingMode = e.renderingMode, this.layerTransparency = e.layerTransparency, this.xSlice = e.xSlice, this.ySlice = e.ySlice, this.zSlice = e.zSlice, this.uniforms.lodFactor.value = e.lodFactor, A(`lodFactor ${e.lodFactor}`), this.shader.uniforms.lodFactor.value = e.lodFactor, A("Updating from props - success"), !0) : (A("Updating from props - invalid settings"), !1);
2593
+ return e.valid ? (this.channelsVisible = e.channelsVisible, this.channelTargetC = e.channelTargetC, this.channelMaxResolutionIndex = e.channelMaxResolutionIndex, this.colors = e.colors, this.contrastLimits = e.contrastLimits, this.renderingMode = e.renderingMode, this.layerTransparency = e.layerTransparency, this.xSlice = e.xSlice, this.ySlice = e.ySlice, this.zSlice = e.zSlice, this.uniforms.lodFactor.value = e.lodFactor, P(`lodFactor ${e.lodFactor}`), this.shader.uniforms.lodFactor.value = e.lodFactor, P("Updating from props - success"), !0) : (P("Updating from props - invalid settings"), !1);
2590
2594
  }
2591
2595
  /**
2592
2596
  * Update the rendering based on the current volume data from the data manager
2593
2597
  * @param {object} volumeDataManagerProps - Params derived from the volume data manager
2594
2598
  * @returns {Object|null} Updated rendering settings or null if rendering is not possible
2595
2599
  */
2596
- updateRendering({ zarrStoreShapes: t, originalScaleXYZ: e, physicalDimensionsXYZ: i, maxResolutionXYZ: o, boxDimensionsXYZ: r, normalizedScaleXYZ: a, bcTHREE: l, ptTHREE: u }) {
2597
- if (A("Updating rendering"), this.channelTargetC.findIndex((m, h) => this.channelsVisible[h]), !Array.isArray(t) || t.length === 0)
2600
+ updateRendering({ zarrStoreShapes: t, originalScaleXYZ: e, physicalDimensionsXYZ: i, maxResolutionXYZ: o, boxDimensionsXYZ: r, normalizedScaleXYZ: a, bcTHREE: c, ptTHREE: u }) {
2601
+ if (P("Updating rendering"), this.channelTargetC.findIndex((v, h) => this.channelsVisible[h]), !Array.isArray(t) || t.length === 0)
2598
2602
  return null;
2599
- const s = t[0], v = {
2600
- xLength: s[4] || 1,
2601
- yLength: s[3] || 1,
2602
- zLength: s[2] || 1
2603
- }, g = [], c = [], d = [];
2604
- if (this.channelTargetC.forEach((m, h) => {
2603
+ const l = t[0], p = {
2604
+ xLength: l[4] || 1,
2605
+ yLength: l[3] || 1,
2606
+ zLength: l[2] || 1
2607
+ }, m = [], s = [], d = [];
2608
+ if (this.channelTargetC.forEach((v, h) => {
2605
2609
  this.channelsVisible[h];
2606
2610
  {
2607
2611
  const b = [0, this.maxRange ? this.maxRange : 255];
2608
- c.push([
2612
+ s.push([
2609
2613
  this.colors[h][0] / 255,
2610
2614
  this.colors[h][1] / 255,
2611
2615
  this.colors[h][2] / 255,
2612
2616
  this.channelsVisible[h] ? 1 : 0
2613
- ]), n.debug("colorsSave", c), this.contrastLimits[h][0] === 0 && this.contrastLimits[h][1] === 255 ? d.push([
2614
- re(b[0], b),
2615
- re(b[1], b)
2617
+ ]), n.debug("colorsSave", s), this.contrastLimits[h][0] === 0 && this.contrastLimits[h][1] === 255 ? d.push([
2618
+ ie(b[0], b),
2619
+ ie(b[1], b)
2616
2620
  ]) : d.push([
2617
- re(this.contrastLimits[h][0], b),
2618
- re(this.contrastLimits[h][1], b)
2621
+ ie(this.contrastLimits[h][0], b),
2622
+ ie(this.contrastLimits[h][1], b)
2619
2623
  ]);
2620
2624
  }
2621
2625
  }), !this.zarrInit) {
2622
2626
  this.originalScale = e, this.physicalDimensions = i, this.maxResolution = o;
2623
- const m = r;
2627
+ const v = r;
2624
2628
  this.normalizedScale = a, this.meshScale = [
2625
2629
  this.originalScale[0] / this.originalScale[0],
2626
2630
  this.originalScale[1] / this.originalScale[0],
2627
2631
  this.originalScale[2] / this.originalScale[0]
2628
- ], this.geometrySize = m, this.boxSize = m, n.debug("this.boxSize", this.boxSize), n.debug("this.geometrySize", this.geometrySize), n.debug("this.meshScale", this.meshScale), n.debug("this.originalScale", this.originalScale), n.debug("this.physicalDimensions", this.physicalDimensions), n.debug("this.maxResolution", this.maxResolution), n.debug("scaledResolution", m), this.zarrInit = !0;
2632
+ ], this.geometrySize = v, this.boxSize = v, n.debug("this.boxSize", this.boxSize), n.debug("this.geometrySize", this.geometrySize), n.debug("this.meshScale", this.meshScale), n.debug("this.originalScale", this.originalScale), n.debug("this.physicalDimensions", this.physicalDimensions), n.debug("this.maxResolution", this.maxResolution), n.debug("scaledResolution", v), this.zarrInit = !0;
2629
2633
  }
2630
2634
  return this.updateUniforms(
2631
- g,
2632
- v,
2635
+ m,
2636
+ p,
2633
2637
  // Pass dimensions object instead of volume
2634
2638
  this.renderingMode,
2635
2639
  d,
2636
- c,
2640
+ s,
2637
2641
  this.layerTransparency,
2638
2642
  this.xSlice,
2639
2643
  this.ySlice,
2640
2644
  this.zSlice,
2641
- l,
2645
+ c,
2642
2646
  u
2643
2647
  ), {
2644
2648
  uniforms: this.uniforms,
@@ -2660,10 +2664,10 @@ class nt {
2660
2664
  * @param {Vector2} ySlice - Y clipping plane
2661
2665
  * @param {Vector2} zSlice - Z clipping plane
2662
2666
  */
2663
- updateUniforms(t, e, i, o, r, a, l, u, s, v, g) {
2664
- A("Updating uniforms"), this.uniforms.boxSize.value.set(this.boxSize[0], this.boxSize[1], this.boxSize[2]), this.uniforms.brickCacheTex.value = v, this.uniforms.pageTableTex.value = g, this.uniforms.near.value = 0.1, this.uniforms.far.value = 3e3, this.uniforms.opacity.value = a, this.uniforms.volumeCount.value = t.length, this.uniforms.u_size.value.set(e.xLength, e.yLength, e.zLength), this.uniforms.u_window_size.value.set(0, 0), this.uniforms.u_vol_scale.value.set(1 / e.xLength, 1 / e.yLength, 1 / e.zLength * 2), this.uniforms.clim0.value.set(o.length > 0 ? o[0][0] : null, o.length > 0 ? o[0][1] : null), this.uniforms.clim1.value.set(o.length > 1 ? o[1][0] : null, o.length > 1 ? o[1][1] : null), this.uniforms.clim2.value.set(o.length > 2 ? o[2][0] : null, o.length > 2 ? o[2][1] : null), this.uniforms.clim3.value.set(o.length > 3 ? o[3][0] : null, o.length > 3 ? o[3][1] : null), this.uniforms.clim4.value.set(o.length > 4 ? o[4][0] : null, o.length > 4 ? o[4][1] : null), this.uniforms.clim5.value.set(o.length > 5 ? o[5][0] : null, o.length > 5 ? o[5][1] : null), this.uniforms.clim6.value.set(o.length > 6 ? o[6][0] : null, o.length > 6 ? o[6][1] : null), this.uniforms.xClip.value.set(l[0] * (1 / this.maxResolution[0]) * this.boxSize[0], l[1] * (1 / this.maxResolution[0]) * this.boxSize[0]), this.uniforms.yClip.value.set(u[0] * (1 / this.maxResolution[1]) * this.boxSize[1], u[1] * (1 / this.maxResolution[1]) * this.boxSize[1]), this.uniforms.zClip.value.set(s[0] * (1 / this.maxResolution[2]) * this.boxSize[2], s[1] * (1 / this.maxResolution[2]) * this.boxSize[2]), this.uniforms.color0.value.set(r.length > 0 ? r[0][0] : null, r.length > 0 ? r[0][1] : null, r.length > 0 ? r[0][2] : null, r.length > 0 ? r[0][3] : null), this.uniforms.color1.value.set(r.length > 1 ? r[1][0] : null, r.length > 1 ? r[1][1] : null, r.length > 1 ? r[1][2] : null, r.length > 1 ? r[1][3] : null), this.uniforms.color2.value.set(r.length > 2 ? r[2][0] : null, r.length > 2 ? r[2][1] : null, r.length > 2 ? r[2][2] : null, r.length > 2 ? r[2][3] : null), this.uniforms.color3.value.set(r.length > 3 ? r[3][0] : null, r.length > 3 ? r[3][1] : null, r.length > 3 ? r[3][2] : null, r.length > 3 ? r[3][3] : null), this.uniforms.color4.value.set(r.length > 4 ? r[4][0] : null, r.length > 4 ? r[4][1] : null, r.length > 4 ? r[4][2] : null, r.length > 4 ? r[4][3] : null), this.uniforms.color5.value.set(r.length > 5 ? r[5][0] : null, r.length > 5 ? r[5][1] : null, r.length > 5 ? r[5][2] : null, r.length > 5 ? r[5][3] : null), this.uniforms.color6.value.set(r.length > 6 ? r[6][0] : null, r.length > 6 ? r[6][1] : null, r.length > 6 ? r[6][2] : null, r.length > 6 ? r[6][3] : null);
2665
- for (let c = 0; c < 7; c++)
2666
- typeof this.channelMaxResolutionIndex[c] == "number" && this.uniforms[`res${c}`].value.set(Math.max(1, this.channelMaxResolutionIndex[c]), this.zarrStoreNumResolutions - 1);
2667
+ updateUniforms(t, e, i, o, r, a, c, u, l, p, m) {
2668
+ P("Updating uniforms"), this.uniforms.boxSize.value.set(this.boxSize[0], this.boxSize[1], this.boxSize[2]), this.uniforms.brickCacheTex.value = p, this.uniforms.pageTableTex.value = m, this.uniforms.near.value = 0.1, this.uniforms.far.value = 3e3, this.uniforms.opacity.value = a, this.uniforms.volumeCount.value = t.length, this.uniforms.u_size.value.set(e.xLength, e.yLength, e.zLength), this.uniforms.u_window_size.value.set(0, 0), this.uniforms.u_vol_scale.value.set(1 / e.xLength, 1 / e.yLength, 1 / e.zLength * 2), this.uniforms.clim0.value.set(o.length > 0 ? o[0][0] : null, o.length > 0 ? o[0][1] : null), this.uniforms.clim1.value.set(o.length > 1 ? o[1][0] : null, o.length > 1 ? o[1][1] : null), this.uniforms.clim2.value.set(o.length > 2 ? o[2][0] : null, o.length > 2 ? o[2][1] : null), this.uniforms.clim3.value.set(o.length > 3 ? o[3][0] : null, o.length > 3 ? o[3][1] : null), this.uniforms.clim4.value.set(o.length > 4 ? o[4][0] : null, o.length > 4 ? o[4][1] : null), this.uniforms.clim5.value.set(o.length > 5 ? o[5][0] : null, o.length > 5 ? o[5][1] : null), this.uniforms.clim6.value.set(o.length > 6 ? o[6][0] : null, o.length > 6 ? o[6][1] : null), this.uniforms.xClip.value.set(c[0] * (1 / this.maxResolution[0]) * this.boxSize[0], c[1] * (1 / this.maxResolution[0]) * this.boxSize[0]), this.uniforms.yClip.value.set(u[0] * (1 / this.maxResolution[1]) * this.boxSize[1], u[1] * (1 / this.maxResolution[1]) * this.boxSize[1]), this.uniforms.zClip.value.set(l[0] * (1 / this.maxResolution[2]) * this.boxSize[2], l[1] * (1 / this.maxResolution[2]) * this.boxSize[2]), this.uniforms.color0.value.set(r.length > 0 ? r[0][0] : null, r.length > 0 ? r[0][1] : null, r.length > 0 ? r[0][2] : null, r.length > 0 ? r[0][3] : null), this.uniforms.color1.value.set(r.length > 1 ? r[1][0] : null, r.length > 1 ? r[1][1] : null, r.length > 1 ? r[1][2] : null, r.length > 1 ? r[1][3] : null), this.uniforms.color2.value.set(r.length > 2 ? r[2][0] : null, r.length > 2 ? r[2][1] : null, r.length > 2 ? r[2][2] : null, r.length > 2 ? r[2][3] : null), this.uniforms.color3.value.set(r.length > 3 ? r[3][0] : null, r.length > 3 ? r[3][1] : null, r.length > 3 ? r[3][2] : null, r.length > 3 ? r[3][3] : null), this.uniforms.color4.value.set(r.length > 4 ? r[4][0] : null, r.length > 4 ? r[4][1] : null, r.length > 4 ? r[4][2] : null, r.length > 4 ? r[4][3] : null), this.uniforms.color5.value.set(r.length > 5 ? r[5][0] : null, r.length > 5 ? r[5][1] : null, r.length > 5 ? r[5][2] : null, r.length > 5 ? r[5][3] : null), this.uniforms.color6.value.set(r.length > 6 ? r[6][0] : null, r.length > 6 ? r[6][1] : null, r.length > 6 ? r[6][2] : null, r.length > 6 ? r[6][3] : null);
2669
+ for (let s = 0; s < 7; s++)
2670
+ typeof this.channelMaxResolutionIndex[s] == "number" && this.uniforms[`res${s}`].value.set(Math.max(1, this.channelMaxResolutionIndex[s]), this.zarrStoreNumResolutions - 1);
2667
2671
  }
2668
2672
  /**
2669
2673
  * Sets the processing render target
@@ -2676,12 +2680,12 @@ class nt {
2676
2680
  }
2677
2681
  */
2678
2682
  setChannelMapping(t) {
2679
- A("setting channel mapping"), n.debug("channelMapping", t), this.uniforms.channelMapping.value = t;
2683
+ P("setting channel mapping"), n.debug("channelMapping", t), this.uniforms.channelMapping.value = t;
2680
2684
  }
2681
2685
  // Only called on initialization of the
2682
2686
  // VolumeDataManager and VolumeRenderManager for a particular image.
2683
2687
  setZarrUniforms(t, e) {
2684
- A("setting zarr uniforms"), n.debug("zarrStore", t), n.debug("PT", e);
2688
+ P("setting zarr uniforms"), n.debug("zarrStore", t), n.debug("PT", e);
2685
2689
  for (let i = 0; i <= 9; i++)
2686
2690
  e.anchors && e.anchors[i] ? this.uniforms[`anchor${i}`].value.set(e.anchors[i][0] || 0, e.anchors[i][1] || 0, e.anchors[i][2] || 0) : (n.debug("anchor", i, "does not exist"), this.uniforms[`anchor${i}`].value.set(0, 0, 0)), t.scales && t.scales[i] ? this.uniforms[`scale${i}`].value.set(t.scales[i][0] || 1, t.scales[i][1] || 1, t.scales[i][2] || 1) : n.debug("scale", i, "does not exist");
2687
2691
  n.debug("zarrStore.brickLayout", t.brickLayout), this.zarrStoreNumResolutions = t.brickLayout.length;
@@ -2694,13 +2698,13 @@ class nt {
2694
2698
  this.uniforms.resGlobal.value.set(1, t.brickLayout.length - 1), this.uniforms.voxelExtents.value.set(t.shapes[0][4], t.shapes[0][3], t.shapes[0][2]), this.uniforms.maxChannels.value = Math.min(t.channelCount, 7), n.debug("this.channelsVisible", this.channelsVisible), n.debug("zarrStore.shapes[0]", t.shapes[0]), n.debug("PT", e), n.debug("uniforms", this.uniforms);
2695
2699
  }
2696
2700
  }
2697
- const rt = `//
2701
+ const ot = `//
2698
2702
  varying vec2 vUv;
2699
2703
  void main() {
2700
2704
  vUv = uv;
2701
2705
  gl_Position = vec4(position, 1.0);
2702
2706
  }
2703
- `, it = `//
2707
+ `, at = `//
2704
2708
  // Input texture to blur
2705
2709
  uniform sampler2D tDiffuse;
2706
2710
  // Resolution of the texture (width, height)
@@ -2890,53 +2894,53 @@ function _e(f, t) {
2890
2894
  const e = f.properties?.get(t);
2891
2895
  return e?.framebuffer || e?.__webglFramebuffer || t.__webglFramebuffer;
2892
2896
  }
2893
- function Q(f) {
2894
- le(ce.DEBUG) && console.warn(`%cV: ${f}`, "background: deeppink; color: white; padding: 2px; border-radius: 3px;");
2897
+ function J(f) {
2898
+ ce(ue.DEBUG) && console.warn(`%cV: ${f}`, "background: deeppink; color: white; padding: 2px; border-radius: 3px;");
2895
2899
  }
2896
- function ot(f, t, e, { mrtRef: i }) {
2900
+ function st(f, t, e, { mrtRef: i }) {
2897
2901
  f.setRenderTarget(i.current), f.clear(!0, !0, !0), f.render(e, t);
2898
2902
  }
2899
- function at(f, { screenSceneRef: t, screenCameraRef: e }) {
2903
+ function lt(f, { screenSceneRef: t, screenCameraRef: e }) {
2900
2904
  f.setRenderTarget(null), f.clear(!0, !0, !0), f.render(t.current, e.current);
2901
2905
  }
2902
- function st(f, { frameRef: t, dataManager: e, mrtRef: i, bufRequest: o, bufUsage: r }) {
2903
- const a = f.getContext(), l = t.current;
2904
- e.noNewRequests === !0 && !e.manuallyStopped && l % 100 === 0 && l < 500 && (e.noNewRequests = !1), e.triggerRequest === !0 && e.noNewRequests === !1 ? (a.bindFramebuffer(a.READ_FRAMEBUFFER, _e(f, i.current)), a.readBuffer(a.COLOR_ATTACHMENT1), a.readPixels(0, 0, i.current.width, i.current.height, a.RGBA, a.UNSIGNED_BYTE, o.current), e.processRequestData(o.current, {
2906
+ function ct(f, { frameRef: t, dataManager: e, mrtRef: i, bufRequest: o, bufUsage: r }) {
2907
+ const a = f.getContext(), c = t.current;
2908
+ e.noNewRequests === !0 && !e.manuallyStopped && c % 100 === 0 && c < 500 && (e.noNewRequests = !1), e.triggerRequest === !0 && e.noNewRequests === !1 ? (a.bindFramebuffer(a.READ_FRAMEBUFFER, _e(f, i.current)), a.readBuffer(a.COLOR_ATTACHMENT1), a.readPixels(0, 0, i.current.width, i.current.height, a.RGBA, a.UNSIGNED_BYTE, o.current), e.processRequestData(o.current, {
2905
2909
  // If width/height are not yet available,
2906
2910
  // processRequestData will proceed without weighting.
2907
2911
  width: i?.current?.width,
2908
2912
  height: i?.current?.height,
2909
2913
  // Default sigmaNormalized = 0.25; can be tuned
2910
- sigmaNormalized: We
2914
+ sigmaNormalized: Qe
2911
2915
  })) : e.triggerUsage === !0 && e.noNewRequests === !1 && (a.bindFramebuffer(a.READ_FRAMEBUFFER, _e(f, i.current)), a.readBuffer(a.COLOR_ATTACHMENT2), a.readPixels(0, 0, i.current.width, i.current.height, a.RGBA, a.UNSIGNED_BYTE, r.current), e.processUsageData(r.current));
2912
2916
  }
2913
- function lt(f, t) {
2914
- const { invalidate: e, isInteracting: i, dataManager: o, spatialRenderingModeChanging: r, meshRef: a, stillRef: l, screenQuadRef: u, lastSampleRef: s, frameRef: v, lastFrameCountRef: g } = t;
2915
- if (u.current && (l.current ? u.current.material.uniforms.gaussian.value = 0 : u.current.material.uniforms.gaussian.value = 7), i) {
2917
+ function ut(f, t) {
2918
+ const { invalidate: e, isInteracting: i, dataManager: o, spatialRenderingModeChanging: r, meshRef: a, stillRef: c, screenQuadRef: u, lastSampleRef: l, frameRef: p, lastFrameCountRef: m } = t;
2919
+ if (u.current && (c.current ? u.current.material.uniforms.gaussian.value = 0 : u.current.material.uniforms.gaussian.value = 7), i) {
2916
2920
  o.manuallyStopped || (o.noNewRequests = !1, o.triggerUsage = !0);
2917
2921
  return;
2918
2922
  }
2919
2923
  if (r)
2920
2924
  return;
2921
- const c = a.current?.material?.uniforms, d = c?.renderRes?.value ?? o?.PT?.lowestDataRes;
2925
+ const s = a.current?.material?.uniforms, d = s?.renderRes?.value ?? o?.PT?.lowestDataRes;
2922
2926
  if (o.noNewRequests) {
2923
- d !== 0 ? (c && (c.renderRes.value = 0), n.debug("Adaptive Quality: No new requests. Setting renderSpeed to 0 (best quality)."), l.current = !1, u.current.material.uniforms.gaussian.value = 7, e()) : l.current || (n.debug("Adaptive Quality: No new requests and already at best quality. Setting stillRef to true."), l.current = !0, u.current.material.uniforms.gaussian.value = 0);
2927
+ d !== 0 ? (s && (s.renderRes.value = 0), n.debug("Adaptive Quality: No new requests. Setting renderSpeed to 0 (best quality)."), c.current = !1, u.current.material.uniforms.gaussian.value = 7, e()) : c.current || (n.debug("Adaptive Quality: No new requests and already at best quality. Setting stillRef to true."), c.current = !0, u.current.material.uniforms.gaussian.value = 0);
2924
2928
  return;
2925
2929
  }
2926
- l.current && (l.current = !1, e());
2927
- const m = f.getElapsedTime();
2928
- if (m - s.current < 1)
2930
+ c.current && (c.current = !1, e());
2931
+ const v = f.getElapsedTime();
2932
+ if (v - l.current < 1)
2929
2933
  return;
2930
- const h = m - s.current, x = v.current - g.current;
2934
+ const h = v - l.current, g = p.current - m.current;
2931
2935
  let b = 0;
2932
- h > 0 && (b = x / h), s.current = m, g.current = v.current;
2933
- const R = b > 100 && d > 0, E = b < 30 && d < o.PT.lowestDataRes;
2934
- if (R || E) {
2935
- const k = d + (E ? 1 : -1);
2936
- c && (c.renderRes.value = k), e();
2936
+ h > 0 && (b = g / h), l.current = v, m.current = p.current;
2937
+ const R = b > 100 && d > 0, y = b < 30 && d < o.PT.lowestDataRes;
2938
+ if (R || y) {
2939
+ const B = d + (y ? 1 : -1);
2940
+ s && (s.renderRes.value = B), e();
2937
2941
  }
2938
2942
  }
2939
- function ct(f) {
2943
+ function ht(f) {
2940
2944
  const {
2941
2945
  images: t,
2942
2946
  imageLayerScopes: e,
@@ -2945,76 +2949,76 @@ function ct(f) {
2945
2949
  imageChannelCoordination: r,
2946
2950
  // onInitComplete,
2947
2951
  spatialRenderingMode: a,
2948
- spatialRenderingModeChanging: l,
2952
+ spatialRenderingModeChanging: c,
2949
2953
  onVolumeLoadingUpdate: u
2950
2954
  } = f, {
2951
- gl: s
2955
+ gl: l
2952
2956
  // scene,
2953
2957
  // camera
2954
- } = de(), v = de((y) => y.invalidate), g = M(null), c = M(null), d = M(null), m = M(null), h = M(null), [x, b] = he({
2958
+ } = de(), p = de((E) => E.invalidate), m = D(null), s = D(null), d = D(null), v = D(null), h = D(null), [g, b] = se({
2955
2959
  uniforms: null,
2956
2960
  shader: null,
2957
2961
  meshScale: [1, 1, 1],
2958
2962
  geometrySize: [1, 1, 1]
2959
- }), R = a === "3D", E = M(null), k = M(null), L = M(null), [X, T] = he(!1), U = M(null), N = M(!1), Y = M(0), oe = M(0), I = M(0), p = fe(() => new Qe(s), [s]), w = fe(() => new nt(), []);
2960
- $(() => {
2961
- Q("useEffect MRT target matching canvas");
2962
- const { width: y, height: D } = s.domElement, q = new Ne(y, D, 3);
2963
- q.texture.forEach((W) => {
2964
- W.format = Ue, W.type = Ce, W.minFilter = ie, W.magFilter = ie, W.generateMipmaps = !1;
2963
+ }), R = a === "3D", [y, B] = se(!1), U = D(null), L = D(null), T = D(null), [N, G] = se(!1), Y = D(null), Z = D(!1), S = D(0), Re = D(0), ye = D(0), x = fe(() => new et(l), [l]), z = fe(() => new it(), []);
2964
+ Q(() => {
2965
+ J("useEffect MRT target matching canvas");
2966
+ const { width: E, height: I } = l.domElement, X = new Le(E, I, 3);
2967
+ X.texture.forEach(($) => {
2968
+ $.format = Oe, $.type = Ce, $.minFilter = oe, $.magFilter = oe, $.generateMipmaps = !1;
2965
2969
  });
2966
- const O = new Le(), ee = new Oe(-1, 1, 1, -1, 0.1, 10);
2967
- ee.position.z = 1;
2968
- const te = new Fe({
2970
+ const O = new Fe(), te = new Ve(-1, 1, 1, -1, 0.1, 10);
2971
+ te.position.z = 1;
2972
+ const ne = new Ge({
2969
2973
  uniforms: {
2970
2974
  // Bind the first render target texture as the input of the gaussian blur shader.
2971
- tDiffuse: { value: q.texture[0] },
2972
- resolution: { value: new _(y, D) },
2975
+ tDiffuse: { value: X.texture[0] },
2976
+ resolution: { value: new _(E, I) },
2973
2977
  gaussian: { value: 7 }
2974
2978
  },
2975
- vertexShader: rt,
2976
- fragmentShader: it,
2979
+ vertexShader: ot,
2980
+ fragmentShader: at,
2977
2981
  transparent: !0
2978
- }), K = new Ve(new Ge(2, 2), te);
2979
- return O.add(K), E.current = O, k.current = ee, L.current = K, d.current = new Uint8Array(y * D * 4), m.current = new Uint8Array(y * D * 4), h.current = q, () => {
2980
- q.dispose(), te.dispose(), K.geometry.dispose();
2982
+ }), W = new qe(new Ze(2, 2), ne);
2983
+ return O.add(W), U.current = O, L.current = te, T.current = W, d.current = new Uint8Array(E * I * 4), v.current = new Uint8Array(E * I * 4), h.current = X, () => {
2984
+ X.dispose(), ne.dispose(), W.geometry.dispose();
2981
2985
  };
2982
- }, [s]);
2983
- const ae = e?.[0], Re = t?.[ae];
2986
+ }, [l]);
2987
+ const ae = e?.[0], Ee = t?.[ae];
2984
2988
  o?.[ae];
2985
- const J = r?.[0]?.[ae];
2986
- $(() => {
2987
- Q("useEffect INIT");
2988
- let y = !1;
2989
- if (!p || !w) {
2989
+ const ee = r?.[0]?.[ae];
2990
+ Q(() => {
2991
+ J("useEffect INIT");
2992
+ let E = !1;
2993
+ if (!x || !z) {
2990
2994
  n.debug("dataManager or renderManager not initialized yet");
2991
2995
  return;
2992
2996
  }
2993
- if (!Re) {
2997
+ if (!Ee) {
2994
2998
  n.debug("no first image layer yet");
2995
2999
  return;
2996
3000
  }
2997
- if (!J) {
3001
+ if (!ee) {
2998
3002
  n.debug("no firstImageLayerChannelCoordination yet");
2999
3003
  return;
3000
3004
  }
3001
3005
  return (async () => {
3002
- if (p.initStatus === V.COMPLETE) {
3003
- n.debug("dataManager already initialized, skipping");
3006
+ if (x.initStatus === F.COMPLETE) {
3007
+ n.debug("dataManager already initialized, skipping"), B(!0);
3004
3008
  return;
3005
3009
  }
3006
- if (p.initImages(t, e), await p.init(J), y) {
3010
+ if (x.initImages(t, e), await x.init(ee), E) {
3007
3011
  n.debug("Initialization useEffect has rerun, aborting remaining initialization");
3008
3012
  return;
3009
3013
  }
3010
- n.debug("dataManager initialized"), w.setZarrUniforms(p.zarrStore, p.PT), w.setChannelMapping(p.channels.colorMappings), n.debug("rm.uniforms", w.uniforms), v();
3014
+ n.debug("dataManager initialized"), z.setZarrUniforms(x.zarrStore, x.PT), z.setChannelMapping(x.channels.colorMappings), n.debug("rm.uniforms", z.uniforms), B(!0), p();
3011
3015
  })(), () => {
3012
- y = !0;
3016
+ E = !0;
3013
3017
  };
3014
- }, [p, w, t, e]), $(() => {
3015
- if (a === "3D" && p && w) {
3016
- Q("useEffect spatialRenderingMode");
3017
- const D = {
3018
+ }, [x, z, t, e]), Q(() => {
3019
+ if (a === "3D" && x && z && y) {
3020
+ J("useEffect spatialRenderingMode");
3021
+ const I = {
3018
3022
  images: t,
3019
3023
  imageLayerScopes: e,
3020
3024
  imageLayerCoordination: i,
@@ -3022,86 +3026,86 @@ function ct(f) {
3022
3026
  imageChannelCoordination: r,
3023
3027
  spatialRenderingMode: a
3024
3028
  };
3025
- if (w.updateFromProps(D)) {
3026
- const { zarrInit: q } = w;
3027
- q || (p.ptTHREE.needsUpdate = !1, p.bcTHREE.needsUpdate = !1, p.renderer.initTexture(p.bcTHREE), p.renderer.initTexture(p.ptTHREE), p.initTexture());
3028
- const O = w.updateRendering({
3029
- zarrStoreShapes: p.zarrStore.shapes,
3030
- originalScaleXYZ: p.getOriginalScaleXYZ(),
3031
- physicalDimensionsXYZ: p.getPhysicalDimensionsXYZ(),
3032
- maxResolutionXYZ: p.getMaxResolutionXYZ(),
3033
- boxDimensionsXYZ: p.getBoxDimensionsXYZ(),
3034
- normalizedScaleXYZ: p.getNormalizedScaleXYZ(),
3035
- bcTHREE: p.bcTHREE,
3036
- ptTHREE: p.ptTHREE
3029
+ if (z.updateFromProps(I)) {
3030
+ const { zarrInit: X } = z;
3031
+ X || (x.ptTHREE.needsUpdate = !1, x.bcTHREE.needsUpdate = !1, x.renderer.initTexture(x.bcTHREE), x.renderer.initTexture(x.ptTHREE), x.initTexture());
3032
+ const O = z.updateRendering({
3033
+ zarrStoreShapes: x.zarrStore.shapes,
3034
+ originalScaleXYZ: x.getOriginalScaleXYZ(),
3035
+ physicalDimensionsXYZ: x.getPhysicalDimensionsXYZ(),
3036
+ maxResolutionXYZ: x.getMaxResolutionXYZ(),
3037
+ boxDimensionsXYZ: x.getBoxDimensionsXYZ(),
3038
+ normalizedScaleXYZ: x.getNormalizedScaleXYZ(),
3039
+ bcTHREE: x.bcTHREE,
3040
+ ptTHREE: x.ptTHREE
3037
3041
  });
3038
3042
  O && b(O);
3039
3043
  }
3040
3044
  }
3041
- }, [p, w, t, e, i, o, r, a]), ke((y, D, q) => {
3042
- if (!h.current || !p || !w || !x.shader)
3045
+ }, [x, z, t, e, i, o, r, a, y]), De((E, I, X) => {
3046
+ if (!h.current || !x || !z || !g.shader)
3043
3047
  return;
3044
- const { gl: O, camera: ee, scene: te, clock: K } = y;
3045
- N.current || ot(O, ee, te, { mrtRef: h }), at(O, { screenSceneRef: E, screenCameraRef: k }), st(O, { frameRef: Y, dataManager: p, mrtRef: h, bufRequest: d, bufUsage: m }), lt(K, {
3046
- invalidate: v,
3047
- isInteracting: X,
3048
- dataManager: p,
3049
- spatialRenderingModeChanging: l,
3050
- meshRef: c,
3051
- stillRef: N,
3052
- screenQuadRef: L,
3053
- lastSampleRef: oe,
3054
- frameRef: Y,
3055
- lastFrameCountRef: I
3056
- }), Y.current += 1;
3048
+ const { gl: O, camera: te, scene: ne, clock: W } = E;
3049
+ Z.current || st(O, te, ne, { mrtRef: h }), lt(O, { screenSceneRef: U, screenCameraRef: L }), ct(O, { frameRef: S, dataManager: x, mrtRef: h, bufRequest: d, bufUsage: v }), ut(W, {
3050
+ invalidate: p,
3051
+ isInteracting: N,
3052
+ dataManager: x,
3053
+ spatialRenderingModeChanging: c,
3054
+ meshRef: s,
3055
+ stillRef: Z,
3056
+ screenQuadRef: T,
3057
+ lastSampleRef: Re,
3058
+ frameRef: S,
3059
+ lastFrameCountRef: ye
3060
+ }), S.current += 1;
3057
3061
  }, 1);
3058
- const H = j((y) => {
3059
- if (Q("invalidateOnInteraction callback"), T(y), y) {
3060
- const D = c.current?.material?.uniforms;
3061
- D && (D.renderRes.value = p.PT.lowestDataRes), N.current = !1, v();
3062
+ const K = H((E) => {
3063
+ if (J("invalidateOnInteraction callback"), G(E), E) {
3064
+ const I = s.current?.material?.uniforms;
3065
+ I && (I.renderRes.value = x.PT.lowestDataRes), Z.current = !1, p();
3062
3066
  }
3063
- }), ye = j((y) => {
3064
- H(!0);
3065
- }), Ee = j((y) => {
3066
- clearTimeout(U.current), U.current = setTimeout(() => {
3067
- H(!1);
3067
+ }), Te = H((E) => {
3068
+ K(!0);
3069
+ }), Se = H((E) => {
3070
+ clearTimeout(Y.current), Y.current = setTimeout(() => {
3071
+ K(!1);
3068
3072
  }, 300);
3069
3073
  });
3070
- $(() => {
3071
- Q("useEffect firstImageLayerChannelCoordination"), H(!0), n.debug("something about channels changed"), p.updateChannels(J), w.setChannelMapping(p.channels.colorMappings), clearTimeout(U.current), U.current = setTimeout(() => {
3072
- H(!1);
3073
- }, 300);
3074
- }, [p, J, w, H]);
3075
- const Te = j(() => {
3076
- p && p.stopLoading();
3077
- }), Se = j(() => {
3078
- p && p.restartLoading();
3079
- }), we = j(() => p ? p.getLoadingProgress() : null);
3080
- return $(() => {
3074
+ Q(() => {
3075
+ y && (J("useEffect firstImageLayerChannelCoordination"), K(!0), n.debug("something about channels changed"), x.updateChannels(ee), z.setChannelMapping(x.channels.colorMappings), clearTimeout(Y.current), Y.current = setTimeout(() => {
3076
+ K(!1);
3077
+ }, 300));
3078
+ }, [x, ee, z, K, y]);
3079
+ const we = H(() => {
3080
+ x && x.stopLoading();
3081
+ }), ze = H(() => {
3082
+ x && x.restartLoading();
3083
+ }), ke = H(() => x ? x.getLoadingProgress() : null);
3084
+ return Q(() => {
3081
3085
  if (!u)
3082
3086
  return;
3083
- const y = setInterval(() => {
3084
- const D = we();
3087
+ const E = setInterval(() => {
3088
+ const I = ke();
3085
3089
  u({
3086
- loadingProgress: D,
3087
- stillRef: N,
3088
- onStopLoading: Te,
3089
- onRestartLoading: Se
3090
+ loadingProgress: I,
3091
+ stillRef: Z,
3092
+ onStopLoading: we,
3093
+ onRestartLoading: ze
3090
3094
  });
3091
3095
  }, 1e3);
3092
- return () => clearInterval(y);
3093
- }, [u, N]), !R || !p || !w ? null : x.shader ? ne("group", { children: [F(
3096
+ return () => clearInterval(E);
3097
+ }, [u, Z]), !R || !x || !z ? null : g.shader ? re("group", { children: [V(
3094
3098
  ve,
3095
3099
  {
3096
3100
  // ref={mainOrbitControlsRef}
3097
3101
  enableDamping: !1,
3098
- onStart: ye,
3099
- onEnd: Ee
3102
+ onStart: Te,
3103
+ onEnd: Se
3100
3104
  }
3101
- ), ne("mesh", { ref: c, scale: x.meshScale, children: [F("boxGeometry", { args: x.geometrySize }), F("shaderMaterial", { uniforms: x.uniforms, vertexShader: x.shader.vertexShader, fragmentShader: x.shader.fragmentShader, side: Ze, transparent: !1, glslVersion: qe })] })] }) : ne("group", { children: [ne("mesh", { children: [F("boxGeometry", { args: [1, 1, 1] }), F("meshBasicMaterial", { color: "#444", wireframe: !0 })] }), F(ve, { ref: g })] });
3105
+ ), re("mesh", { ref: s, scale: g.meshScale, children: [V("boxGeometry", { args: g.geometrySize }), V("shaderMaterial", { uniforms: g.uniforms, vertexShader: g.shader.vertexShader, fragmentShader: g.shader.fragmentShader, side: je, transparent: !1, glslVersion: Xe })] })] }) : re("group", { children: [re("mesh", { children: [V("boxGeometry", { args: [1, 1, 1] }), V("meshBasicMaterial", { color: "#444", wireframe: !0 })] }), V(ve, { ref: m })] });
3102
3106
  }
3103
- function mt(f) {
3104
- return F(Ie, { frameloop: "always", style: {
3107
+ function xt(f) {
3108
+ return V(Me, { frameloop: "always", style: {
3105
3109
  position: "absolute",
3106
3110
  top: 0,
3107
3111
  left: 0,
@@ -3121,8 +3125,8 @@ function mt(f) {
3121
3125
  logarithmicDepthBuffer: !1,
3122
3126
  preserveDrawingBuffer: !1,
3123
3127
  autoClear: !1
3124
- }, children: F(ze, { fallback: "Initializing Volume View...", children: F(ct, { ...f }) }) });
3128
+ }, children: V(Ie, { fallback: "Initializing Volume View...", children: V(ht, { ...f }) }) });
3125
3129
  }
3126
3130
  export {
3127
- mt as SpatialWrapper
3131
+ xt as SpatialWrapper
3128
3132
  };