11import * as THREE from 'three'
2- import { Canvas , createPortal , useThree } from '@react-three/fiber' ;
3- import { Center , Html , Hud , OrthographicCamera , PerspectiveCamera , Text } from '@react-three/drei'
2+ // ! don't import things that are not used in the code, build will fail
3+ // import { Canvas, createPortal, useThree } from '@react-three/fiber';
4+ // import { Center, Html, Text } from '@react-three/drei'
5+ import { Hud , OrthographicCamera , Text } from '@react-three/drei'
46import { useMemo , useState , useEffect } from 'react' ;
57import { GetTimeSeries } from './ZarrLoaderLRU' ;
68
7-
8-
9- const storeURL = "https://s3.bgc-jena.mpg.de:9000/esdl-esdc-v3.0.2/esdc-16d-2.5deg-46x72x1440-3.0.2.zarr"
9+ // const storeURL = "https://s3.bgc-jena.mpg.de:9000/esdl-esdc-v3.0.2/esdc-16d-2.5deg-46x72x1440-3.0.2.zarr"
1010
1111interface timeSeriesLocs {
1212 uv :THREE . Vector2 ;
@@ -29,7 +29,7 @@ export function TimeSeries({timeSeriesLocs,DSInfo,scaling} : {timeSeriesLocs:tim
2929 const { variable, storePath} = DSInfo ;
3030 const { maxVal, minVal} = scaling ;
3131 const [ timeSeries , setTimeSeries ] = useState < number [ ] > ( [ 0 ] ) ;
32- const [ xLabls , setXLabels ] = useState ( ) ;
32+ // const [xLabls,setXLabels] = useState();
3333 const [ yLabels , setYLabels ] = useState ( ) ;
3434 const verticleScale = 2 ;
3535 const horizontalScale = 5 ;
@@ -72,12 +72,14 @@ export function TimeSeries({timeSeriesLocs,DSInfo,scaling} : {timeSeriesLocs:tim
7272 yMax = ( yMax - 0.5 ) * verticleScale
7373 const step = ( maxVal - minVal ) / 3 ;
7474 let yLabels = Array . from ( { length : 3 } , ( _ , i ) => Math . round ( minVal + step * i ) )
75- let yPos = yLabels . map ( ( val , ind ) => {
75+ let yPos = yLabels . map ( val => {
7676 return ( ( ( val - minVal ) / ( maxVal - minVal ) ) - 0.5 ) * verticleScale
7777 } )
7878 yPos = [ yMin , ...yPos . slice ( 1 ) , yMax ]
7979 yLabels = [ Math . ceil ( minVal ) , ...yLabels . slice ( 1 ) , Math . floor ( maxVal ) ]
80-
80+ // console unused variables
81+ console . log ( xPos , xMin , xMax , yPos , yMin , yMax )
82+
8183 setYLabels ( {
8284 positions :yPos ,
8385 labels :yLabels
0 commit comments