Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/components/plots/CountryBorders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,9 @@ const CountryBorders = () => {

const isPC = plotType == 'point-cloud'
const isFlatMap = plotType == "flat"
const depthScale = dataShape[0]/dataShape[2]*timeScale
const timeRatio = Math.max(dataShape[0]/dataShape[2],2)
const depthScale = timeRatio*timeScale

const globalScale = isPC ? dataShape[2]/500 : 1

return(
Expand All @@ -241,7 +243,7 @@ const CountryBorders = () => {
>
<group
visible={showBorders && !(analysisMode && axis != 0)}
position={(spherize || isFlatMap) ? [0,0,(isFlatMap ? 0.001 : 0)] : [0, 0, swapSides ? zRange[0]*(isPC ? depthScale + pointSize/10000 : 1) : zRange[1]*(isPC ? depthScale + pointSize/10000 : 1)]} // I don't know what value to use here. THis seems okay but not perfect
position={(spherize || isFlatMap) ? [0,0,(isFlatMap ? 0.001 : 0)] : [0, 0, swapSides ? zRange[0]*(isPC ? depthScale + pointSize/10000 : timeRatio/2) : zRange[1]*(isPC ? depthScale + pointSize/10000 : timeRatio/2)]} // I don't know what value to use here. THis seems okay but not perfect
>
{coastLines && <Borders features={coastLines} />}
{borders && <Borders features={borders} />}
Expand Down
4 changes: 4 additions & 0 deletions src/components/plots/Plot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,10 @@ const Plot = ({ZarrDS}:{ZarrDS: ZarrDataset}) => {
setTextures(updated as THREE.Data3DTexture[] | THREE.DataTexture[]);
},[interpPixels])

useEffect(()=>{ // Rotates flat back when changing away
usePlotStore.setState({rotateFlat: false})
},[plotType])

const Nav = useMemo(()=>Navbar,[])
return (
<div id='main-canvas-div' className='main-canvas'
Expand Down