@vitessce/all 3.8.5 → 3.8.7

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.
@@ -1,4 +1,4 @@
1
- import { aF as getDefaultExportFromCjs, aG as Raycaster, W as OrthographicCamera, K as PerspectiveCamera, av as Scene, aH as PCFSoftShadowMap, aI as VSMShadowMap, aJ as PCFShadowMap, aK as BasicShadowMap, aL as NoToneMapping, aM as ACESFilmicToneMapping, e as Vector3, V as Vector2, aN as Clock, aO as WebGLRenderer, aP as Camera, x as BufferGeometry, r as Material, aQ as Layers, a1 as Texture, aC as RGBAFormat, ay as UnsignedByteType, C as Color, aj as _extends, aR as THREE, aS as EventDispatcher, aT as MOUSE, aU as TOUCH, aV as Spherical, Q as Quaternion, an as Ray, ak as Plane } from "./index-diSsBj8e.js";
1
+ import { aF as getDefaultExportFromCjs, aG as Raycaster, W as OrthographicCamera, K as PerspectiveCamera, av as Scene, aH as PCFSoftShadowMap, aI as VSMShadowMap, aJ as PCFShadowMap, aK as BasicShadowMap, aL as NoToneMapping, aM as ACESFilmicToneMapping, e as Vector3, V as Vector2, aN as Clock, aO as WebGLRenderer, aP as Camera, x as BufferGeometry, r as Material, aQ as Layers, a1 as Texture, aC as RGBAFormat, ay as UnsignedByteType, C as Color, aj as _extends, aR as THREE, aS as EventDispatcher, aT as MOUSE, aU as TOUCH, aV as Spherical, Q as Quaternion, an as Ray, ak as Plane } from "./index-TF8hfyKX.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,4 +1,4 @@
1
- import { aF as getDefaultExportFromCjs, b0 as requireAssign, b1 as require_export, b2 as require_core, b3 as require_fails, b4 as require_toObject, b5 as require_objectKeys, b6 as require_cof, b7 as require_wks, b8 as require_iterators, b9 as requireWeb_dom_iterable, ba as requireEs6_string_iterator, bb as require_anObject, bc as require_hide, bd as require_ctx, be as require_toLength, bf as require_global, bg as require_objectDp, bh as require_descriptors, bi as require_isObject, bj as require_objectCreate, bk as require_iterDefine, bl as require_iterStep, bm as require_meta, bn as require_isArray, bo as require_iobject, bp as require_setToStringTag, bq as require_aFunction, br as requireIterator, bs as require_propertyDesc, aZ as commonjsGlobal, bt as requireEs6_symbol, bu as requireDefineProperty, bv as require_toIobject, bw as require_objectGopd, bx as require_html, by as require_domCreate, bz as require_library, bA as requireSymbol, bB as require_objectPie, bC as require_has, bD as require_redefine, bE as require_objectAssign, bF as diffCameraState, ao as jsxRuntimeExports } from "./index-diSsBj8e.js";
1
+ import { aF as getDefaultExportFromCjs, b0 as requireAssign, b1 as require_export, b2 as require_core, b3 as require_fails, b4 as require_toObject, b5 as require_objectKeys, b6 as require_cof, b7 as require_wks, b8 as require_iterators, b9 as requireWeb_dom_iterable, ba as requireEs6_string_iterator, bb as require_anObject, bc as require_hide, bd as require_ctx, be as require_toLength, bf as require_global, bg as require_objectDp, bh as require_descriptors, bi as require_isObject, bj as require_objectCreate, bk as require_iterDefine, bl as require_iterStep, bm as require_meta, bn as require_isArray, bo as require_iobject, bp as require_setToStringTag, bq as require_aFunction, br as requireIterator, bs as require_propertyDesc, aZ as commonjsGlobal, bt as requireEs6_symbol, bu as requireDefineProperty, bv as require_toIobject, bw as require_objectGopd, bx as require_html, by as require_domCreate, bz as require_library, bA as requireSymbol, bB as require_objectPie, bC as require_has, bD as require_redefine, bE as require_objectAssign, bF as diffCameraState, ao as jsxRuntimeExports } from "./index-TF8hfyKX.js";
2
2
  import React__default from "react";
3
3
  var assignExports = requireAssign();
4
4
  const _Object$assign = /* @__PURE__ */ getDefaultExportFromCjs(assignExports);
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-SxljTded.js";
2
- import { aW as BaseDecoder } from "./index-diSsBj8e.js";
2
+ import { aW as BaseDecoder } from "./index-TF8hfyKX.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 { aZ as commonjsGlobal$1, a_ as requireObjectAssign, aF as getDefaultExportFromCjs$1, a$ as earcut } from "./index-diSsBj8e.js";
4
+ import { aZ as commonjsGlobal$1, a_ as requireObjectAssign, aF as getDefaultExportFromCjs$1, a$ as earcut } from "./index-TF8hfyKX.js";
5
5
  var promise = {};
6
6
  var hasRequiredPromise;
7
7
  function requirePromise() {
@@ -1,6 +1,6 @@
1
- import { aw as log, ax as isEqual, ar as Data3DTexture, as as RedFormat, ay as UnsignedByteType, l as LinearFilter, az as RedIntegerFormat, aA as UnsignedIntType, m as NearestFilter, e as Vector3, V as Vector2, ag as Vector4, ae as UniformsUtils, aq as CoordinationType, aB as WebGLMultipleRenderTargets, aC as RGBAFormat, av as Scene, W as OrthographicCamera, ad as ShaderMaterial, z as Mesh, aD as PlaneGeometry, ao as jsxRuntimeExports, aE as GLSL3, am as BackSide } from "./index-diSsBj8e.js";
1
+ import { aw as log, ax as isEqual, ar as Data3DTexture, as as RedFormat, ay as UnsignedByteType, l as LinearFilter, az as RedIntegerFormat, aA as UnsignedIntType, m as NearestFilter, e as Vector3, V as Vector2, ag as Vector4, ae as UniformsUtils, aq as CoordinationType, aB as WebGLMultipleRenderTargets, aC as RGBAFormat, av as Scene, W as OrthographicCamera, ad as ShaderMaterial, z as Mesh, aD as PlaneGeometry, ao as jsxRuntimeExports, aE as GLSL3, am as BackSide } from "./index-TF8hfyKX.js";
2
2
  import { useRef, useState, useMemo, useEffect, useCallback } from "react";
3
- import { u as useThree, a as useFrame, O as OrbitControls, C as Canvas } from "./OrbitControls-CRmdQgxj.js";
3
+ import { u as useThree, a as useFrame, O as OrbitControls, C as Canvas } from "./OrbitControls-BihamWQc.js";
4
4
  const LogLevel = {
5
5
  INFO: "info",
6
6
  WARN: "warn",
@@ -220,6 +220,7 @@ function _requestBufferToRequestObjects(buffer, k) {
220
220
  class VolumeDataManager {
221
221
  constructor(glParam) {
222
222
  logWithColor$2("CLASS INITIALIZING");
223
+ log.debug("VolumeDataManager constructor", { glParam, glParamContext: glParam.getContext?.() });
223
224
  const gl = glParam.getContext?.() || glParam;
224
225
  const renderer = glParam;
225
226
  if (gl.domElement && gl.getContext) {
@@ -242,12 +243,20 @@ class VolumeDataManager {
242
243
  };
243
244
  return defaults[param] || 0;
244
245
  },
246
+ isContextLost: () => false,
245
247
  MAX_TEXTURE_SIZE: "MAX_TEXTURE_SIZE",
246
248
  MAX_3D_TEXTURE_SIZE: "MAX_3D_TEXTURE_SIZE",
247
249
  MAX_RENDERBUFFER_SIZE: "MAX_RENDERBUFFER_SIZE",
248
250
  MAX_UNIFORM_BUFFER_BINDINGS: "MAX_UNIFORM_BUFFER_BINDINGS"
249
251
  };
250
252
  }
253
+ this._originalGlParam = glParam;
254
+ this._isContextLost = false;
255
+ this._contextRestoredCallbacks = [];
256
+ if (this.gl && this.gl.canvas) {
257
+ this.gl.canvas.addEventListener("webglcontextlost", this._handleContextLost.bind(this));
258
+ this.gl.canvas.addEventListener("webglcontextrestored", this._handleContextRestored.bind(this));
259
+ }
251
260
  log.debug("GL CONSTANTS");
252
261
  log.debug(this.gl);
253
262
  log.debug(this.gl.TEXTURE0);
@@ -339,8 +348,78 @@ class VolumeDataManager {
339
348
  this.needsBailout = false;
340
349
  this.initStatus = INIT_STATUS.NOT_STARTED;
341
350
  this.initError = null;
351
+ this._lastChannelConfig = null;
342
352
  logWithColor$2("VolumeDataManager constructor complete");
343
353
  }
354
+ /**
355
+ * Handle WebGL context loss
356
+ */
357
+ _handleContextLost(event) {
358
+ logWithColor$2("CONTEXT LOST");
359
+ log.warn("WebGL context lost, preventing default and setting flag");
360
+ event.preventDefault();
361
+ this._isContextLost = true;
362
+ if (this.channels && this.channels.zarrMappings) {
363
+ this._lastChannelConfig = {
364
+ zarrMappings: [...this.channels.zarrMappings],
365
+ colorMappings: [...this.channels.colorMappings],
366
+ downsampleMin: [...this.channels.downsampleMin],
367
+ downsampleMax: [...this.channels.downsampleMax]
368
+ };
369
+ }
370
+ }
371
+ /**
372
+ * Handle WebGL context restoration
373
+ */
374
+ _handleContextRestored(event) {
375
+ logWithColor$2("CONTEXT RESTORED");
376
+ log.warn("WebGL context restored, reinitializing textures");
377
+ this._isContextLost = false;
378
+ if (this._originalGlParam && this._originalGlParam.getContext) {
379
+ this.gl = this._originalGlParam.getContext();
380
+ }
381
+ if (this._lastChannelConfig) {
382
+ this.channels.zarrMappings = [...this._lastChannelConfig.zarrMappings];
383
+ this.channels.colorMappings = [...this._lastChannelConfig.colorMappings];
384
+ this.channels.downsampleMin = [...this._lastChannelConfig.downsampleMin];
385
+ this.channels.downsampleMax = [...this._lastChannelConfig.downsampleMax];
386
+ log.debug("Restored channel configuration after context loss");
387
+ }
388
+ if (this.PT && this.zarrStore && this.zarrStore.brickLayout) {
389
+ try {
390
+ this.initMRMCPT();
391
+ log.debug("Successfully reinitialized MRMCPT after context restoration");
392
+ } catch (error) {
393
+ log.error("Failed to reinitialize MRMCPT after context restoration:", error);
394
+ }
395
+ }
396
+ this._contextRestoredCallbacks.forEach((callback) => {
397
+ try {
398
+ callback();
399
+ } catch (error) {
400
+ log.error("Error in context restored callback:", error);
401
+ }
402
+ });
403
+ }
404
+ /**
405
+ * Check if WebGL context is lost
406
+ */
407
+ isContextLost() {
408
+ if (this._isContextLost)
409
+ return true;
410
+ if (this.gl && typeof this.gl.isContextLost === "function") {
411
+ return this.gl.isContextLost();
412
+ }
413
+ return false;
414
+ }
415
+ /**
416
+ * Register a callback to be called when context is restored
417
+ */
418
+ onContextRestored(callback) {
419
+ if (typeof callback === "function") {
420
+ this._contextRestoredCallbacks.push(callback);
421
+ }
422
+ }
344
423
  initImages(images, imageLayerScopes) {
345
424
  logWithColor$2("INIT IMAGES");
346
425
  this.images = images;
@@ -629,6 +708,12 @@ class VolumeDataManager {
629
708
  log.debug("newColorMappings", newColorMappings);
630
709
  this.channels.colorMappings = newColorMappings;
631
710
  log.debug("updatedChannels", this.channels);
711
+ this._lastChannelConfig = {
712
+ zarrMappings: [...this.channels.zarrMappings],
713
+ colorMappings: [...this.channels.colorMappings],
714
+ downsampleMin: [...this.channels.downsampleMin],
715
+ downsampleMax: [...this.channels.downsampleMax]
716
+ };
632
717
  }
633
718
  /**
634
719
  * Try to load a resolution level
@@ -746,6 +831,10 @@ class VolumeDataManager {
746
831
  log.debug("processRequestData: already busy, skipping");
747
832
  return;
748
833
  }
834
+ if (this.isContextLost()) {
835
+ log.debug("processRequestData: WebGL context is lost, skipping");
836
+ return;
837
+ }
749
838
  this.isBusy = true;
750
839
  this.triggerRequest = false;
751
840
  const { requests, origRequestCount } = _requestBufferToRequestObjects(buffer, this.k);
@@ -763,6 +852,10 @@ class VolumeDataManager {
763
852
  this.needsBailout = true;
764
853
  return;
765
854
  }
855
+ if (this.isContextLost()) {
856
+ log.debug("processUsageData: WebGL context is lost, skipping");
857
+ return;
858
+ }
766
859
  this.isBusy = true;
767
860
  this.triggerUsage = false;
768
861
  const now = ++this.timeStamp;
@@ -804,6 +897,10 @@ class VolumeDataManager {
804
897
  log.error("pagetable texture not initialized");
805
898
  return;
806
899
  }
900
+ if (this.isContextLost()) {
901
+ log.warn("WebGL context is lost, skipping channel purge");
902
+ return;
903
+ }
807
904
  this.channels.downsampleMin[ptChannelIndex] = void 0;
808
905
  this.channels.downsampleMax[ptChannelIndex] = void 0;
809
906
  this.channels.zarrMappings[ptChannelIndex] = void 0;
@@ -833,6 +930,10 @@ class VolumeDataManager {
833
930
  _updatePTEntry(ptX, ptY, ptZ, ptVal) {
834
931
  if (!this.ptTHREE)
835
932
  return;
933
+ if (this.isContextLost()) {
934
+ log.warn("WebGL context is lost, skipping PT entry update");
935
+ return;
936
+ }
836
937
  const { gl } = this;
837
938
  const texPT = this.renderer.properties.get(this.ptTHREE).__webglTexture;
838
939
  gl.activeTexture(gl.TEXTURE0);
@@ -883,16 +984,51 @@ class VolumeDataManager {
883
984
  * 4. Upload one brick + PT entry *
884
985
  * ------------------------------------------------------------- */
885
986
  async _uploadBrick(ptCoord, bcSlot) {
987
+ log.debug("uploading brick", ptCoord, bcSlot);
988
+ if (this.isContextLost()) {
989
+ log.warn("WebGL context is lost, skipping brick upload");
990
+ return;
991
+ }
886
992
  if (ptCoord.x >= this.PT.xExtent || ptCoord.y >= this.PT.yExtent || ptCoord.z >= this.PT.zTotal || ptCoord.x < 0 || ptCoord.y < 0 || ptCoord.z < 0) {
887
993
  log.error("this.PT", this.PT);
888
994
  log.error("ptCoord out of bounds", ptCoord);
889
995
  return;
890
996
  }
891
997
  const { channel, resolution, x, y, z } = _ptToZarr(ptCoord.x, ptCoord.y, ptCoord.z, { PT_zExtent: this.PT.zExtent, PT_z0Extent: this.PT.z0Extent, PT_anchors: this.PT.anchors });
998
+ if (!this.channels || !this.channels.zarrMappings || this.channels.zarrMappings.length === 0) {
999
+ log.error("Channel mappings not initialized, skipping brick upload");
1000
+ return;
1001
+ }
1002
+ if (channel < 0 || channel >= this.channels.zarrMappings.length) {
1003
+ log.error("Channel index out of bounds", { channel, mappingsLength: this.channels.zarrMappings.length });
1004
+ return;
1005
+ }
892
1006
  const zarrChannel = this.channels.zarrMappings[channel];
893
1007
  if (zarrChannel === void 0 || zarrChannel === -1) {
894
- log.error("zarrChannel is undefined or -1", zarrChannel);
895
- return;
1008
+ log.warn("zarrChannel is undefined or -1", {
1009
+ zarrChannel,
1010
+ channel,
1011
+ ptCoord,
1012
+ channelMappings: this.channels.zarrMappings,
1013
+ contextLost: this.isContextLost()
1014
+ });
1015
+ if (this._lastChannelConfig && this._lastChannelConfig.zarrMappings[channel] !== void 0) {
1016
+ log.warn("Attempting to use last known channel config");
1017
+ this.channels.zarrMappings = [...this._lastChannelConfig.zarrMappings];
1018
+ this.channels.colorMappings = [...this._lastChannelConfig.colorMappings];
1019
+ this.channels.downsampleMin = [...this._lastChannelConfig.downsampleMin];
1020
+ this.channels.downsampleMax = [...this._lastChannelConfig.downsampleMax];
1021
+ const restoredZarrChannel = this.channels.zarrMappings[channel];
1022
+ if (restoredZarrChannel !== void 0 && restoredZarrChannel !== -1) {
1023
+ log.debug("Successfully restored channel mapping, continuing with upload");
1024
+ } else {
1025
+ log.error("Could not restore valid channel mapping, aborting brick upload");
1026
+ return;
1027
+ }
1028
+ } else {
1029
+ log.error("No fallback channel config available, aborting brick upload");
1030
+ return;
1031
+ }
896
1032
  }
897
1033
  log.debug("starting to load zarr chunk", { resolution, z, y, x, zarrChannel });
898
1034
  let chunk = await this.loadZarrChunk(0, zarrChannel, z, y, x, resolution);
@@ -962,6 +1098,7 @@ class VolumeDataManager {
962
1098
  if (ptRequests.length === 0)
963
1099
  return;
964
1100
  const slots = this._allocateBCSlots(ptRequests.length);
1101
+ log.debug("Handling brick requests:", { requestCount: ptRequests.length, slotCount: slots.length });
965
1102
  log.debug("handleBrickRequests: starting for loop");
966
1103
  for (let i = 0; i < ptRequests.length; ++i) {
967
1104
  log.debug("uploading brick", ptRequests[i], slots[i]);
@@ -3464,6 +3601,8 @@ function VolumeView(props) {
3464
3601
  useFrame((state, delta, xrFrame) => {
3465
3602
  if (!mrtRef.current || !dataManager || !renderManager)
3466
3603
  return;
3604
+ if (!renderState.shader)
3605
+ return;
3467
3606
  const { gl: frameGl, camera: frameCamera, scene: frameScene, clock } = state;
3468
3607
  if (!stillRef.current) {
3469
3608
  performGeometryPass(frameGl, frameCamera, frameScene, { mrtRef });
@@ -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-diSsBj8e.js";
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-TF8hfyKX.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-CRmdQgxj.js";
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-BihamWQc.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-C4ffdO6D.js"), []);
5030
+ } = suspend(async () => import("./troika-three-text.esm-CSvaWiu2.js"), []);
5031
5031
  const invalidate = useThree(({
5032
5032
  invalidate: invalidate2
5033
5033
  }) => invalidate2);