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
1 change: 0 additions & 1 deletion src/components/plots/AnalysisWG.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ const AnalysisWG = ({ setTexture, }: { setTexture: React.Dispatch<React.SetState
setAnalysisMode(true);
setStatus(null);
}

Analyze()
},[executeCustom])

Expand Down
9 changes: 7 additions & 2 deletions src/components/plots/Sphere.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ export const Sphere = ({textures} : {textures: THREE.Data3DTexture[] | THREE.Dat

const {lonBounds, latBounds} = useCoordBounds()


const geometry = useMemo(() => new THREE.IcosahedronGeometry(1, sphereResolution), [sphereResolution]);
const shaderMaterial = useMemo(()=>{
const shader = new THREE.ShaderMaterial({
Expand Down Expand Up @@ -140,8 +141,12 @@ export const Sphere = ({textures} : {textures: THREE.Data3DTexture[] | THREE.Dat
return shader
},[isFlat, textures, borderTexture])

const backMaterial = shaderMaterial.clone()
backMaterial.side = THREE.BackSide;
const backMaterial = useMemo(()=>{
const mat = shaderMaterial.clone()
mat.side = THREE.BackSide;
return mat;
},[shaderMaterial])

useEffect(()=>{
if (shaderMaterial){
const uniforms = shaderMaterial.uniforms;
Expand Down
Loading