@vitessce/all 3.9.5 → 4.0.0-test.0

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,6 +1,10 @@
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, aE as useEventCallback, ao as jsxRuntimeExports, aF as GLSL3, am as BackSide } from "./index-CJ0WrLWz.js";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useRef, useState, useMemo, useEffect, Suspense } from "react";
3
- import { u as useThree, a as useFrame, O as OrbitControls, C as Canvas } from "./OrbitControls-BdKhfTcE.js";
3
+ import { useThree, useFrame, Canvas } from "@react-three/fiber";
4
+ import { OrbitControls } from "@react-three/drei";
5
+ import * as THREE from "three";
6
+ import { Data3DTexture, RedFormat, UnsignedByteType, LinearFilter, RedIntegerFormat, UnsignedIntType, NearestFilter, Vector3, Vector2, Vector4, UniformsUtils, WebGLMultipleRenderTargets } from "three";
7
+ import { l as log, i as isEqual, C as CoordinationType, u as useEventCallback } from "./index-5W6nu-ix.js";
4
8
  const LogLevel = {
5
9
  INFO: "info",
6
10
  WARN: "warn",
@@ -3596,27 +3600,27 @@ function VolumeView(props) {
3596
3600
  const { width, height } = gl.domElement;
3597
3601
  const mrt = new WebGLMultipleRenderTargets(width, height, 3);
3598
3602
  mrt.texture.forEach((tex) => {
3599
- tex.format = RGBAFormat;
3600
- tex.type = UnsignedByteType;
3601
- tex.minFilter = NearestFilter;
3602
- tex.magFilter = NearestFilter;
3603
+ tex.format = THREE.RGBAFormat;
3604
+ tex.type = THREE.UnsignedByteType;
3605
+ tex.minFilter = THREE.NearestFilter;
3606
+ tex.magFilter = THREE.NearestFilter;
3603
3607
  tex.generateMipmaps = false;
3604
3608
  });
3605
- const screenScene = new Scene();
3606
- const screenCamera = new OrthographicCamera(-1, 1, 1, -1, 0.1, 10);
3609
+ const screenScene = new THREE.Scene();
3610
+ const screenCamera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0.1, 10);
3607
3611
  screenCamera.position.z = 1;
3608
- const screenMaterial = new ShaderMaterial({
3612
+ const screenMaterial = new THREE.ShaderMaterial({
3609
3613
  uniforms: {
3610
3614
  // Bind the first render target texture as the input of the gaussian blur shader.
3611
3615
  tDiffuse: { value: mrt.texture[0] },
3612
- resolution: { value: new Vector2(width, height) },
3616
+ resolution: { value: new THREE.Vector2(width, height) },
3613
3617
  gaussian: { value: 7 }
3614
3618
  },
3615
3619
  vertexShader: gaussianVertexShader,
3616
3620
  fragmentShader: gaussianFragmentShader,
3617
3621
  transparent: true
3618
3622
  });
3619
- const screenQuad = new Mesh(new PlaneGeometry(2, 2), screenMaterial);
3623
+ const screenQuad = new THREE.Mesh(new THREE.PlaneGeometry(2, 2), screenMaterial);
3620
3624
  screenScene.add(screenQuad);
3621
3625
  screenSceneRef.current = screenScene;
3622
3626
  screenCameraRef.current = screenCamera;
@@ -3801,9 +3805,9 @@ function VolumeView(props) {
3801
3805
  if (!is3D || !dataManager || !renderManager)
3802
3806
  return null;
3803
3807
  if (!renderState.shader) {
3804
- return jsxRuntimeExports.jsxs("group", { children: [jsxRuntimeExports.jsxs("mesh", { children: [jsxRuntimeExports.jsx("boxGeometry", { args: [1, 1, 1] }), jsxRuntimeExports.jsx("meshBasicMaterial", { color: "#444", wireframe: true })] }), jsxRuntimeExports.jsx(OrbitControls, { ref: orbitRef })] });
3808
+ return jsxs("group", { children: [jsxs("mesh", { children: [jsx("boxGeometry", { args: [1, 1, 1] }), jsx("meshBasicMaterial", { color: "#444", wireframe: true })] }), jsx(OrbitControls, { ref: orbitRef })] });
3805
3809
  }
3806
- return jsxRuntimeExports.jsxs("group", { children: [jsxRuntimeExports.jsx(
3810
+ return jsxs("group", { children: [jsx(
3807
3811
  OrbitControls,
3808
3812
  {
3809
3813
  // ref={mainOrbitControlsRef}
@@ -3811,10 +3815,10 @@ function VolumeView(props) {
3811
3815
  onStart: onOrbitControlsStart,
3812
3816
  onEnd: onOrbitControlsEnd
3813
3817
  }
3814
- ), jsxRuntimeExports.jsxs("mesh", { ref: meshRef, scale: renderState.meshScale, children: [jsxRuntimeExports.jsx("boxGeometry", { args: renderState.geometrySize }), jsxRuntimeExports.jsx("shaderMaterial", { uniforms: renderState.uniforms, vertexShader: renderState.shader.vertexShader, fragmentShader: renderState.shader.fragmentShader, side: BackSide, transparent: false, glslVersion: GLSL3 })] })] });
3818
+ ), jsxs("mesh", { ref: meshRef, scale: renderState.meshScale, children: [jsx("boxGeometry", { args: renderState.geometrySize }), jsx("shaderMaterial", { uniforms: renderState.uniforms, vertexShader: renderState.shader.vertexShader, fragmentShader: renderState.shader.fragmentShader, side: THREE.BackSide, transparent: false, glslVersion: THREE.GLSL3 })] })] });
3815
3819
  }
3816
3820
  function SpatialWrapper(props) {
3817
- return jsxRuntimeExports.jsx(Canvas, { frameloop: "always", style: {
3821
+ return jsx(Canvas, { frameloop: "always", style: {
3818
3822
  position: "absolute",
3819
3823
  top: 0,
3820
3824
  left: 0,
@@ -3834,7 +3838,7 @@ function SpatialWrapper(props) {
3834
3838
  logarithmicDepthBuffer: false,
3835
3839
  preserveDrawingBuffer: false,
3836
3840
  autoClear: false
3837
- }, children: jsxRuntimeExports.jsx(Suspense, { fallback: "Initializing Volume View...", children: jsxRuntimeExports.jsx(VolumeView, { ...props }) }) });
3841
+ }, children: jsx(Suspense, { fallback: "Initializing Volume View...", children: jsx(VolumeView, { ...props }) }) });
3838
3842
  }
3839
3843
  export {
3840
3844
  SpatialWrapper