Globe: lighter blue material, brighter dots/atmosphere/lights for visibility Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> @
This commit is contained in:
parent
d483ed791b
commit
6f8409b8f0
|
|
@ -11,7 +11,6 @@ type Arc = {
|
|||
arcAlt: number; color: string
|
||||
}
|
||||
|
||||
const NAVY = '#032340'
|
||||
const COLORS = ['#22ade0', '#3b82f6', '#CD9E53']
|
||||
|
||||
/* steel-trade arcs centred on Tehran/Shanghai */
|
||||
|
|
@ -33,12 +32,12 @@ function GlobeObject({ countries }: { countries: { features: object[] } }) {
|
|||
const g = new ThreeGlobe()
|
||||
.hexPolygonsData(countries.features)
|
||||
.hexPolygonResolution(3)
|
||||
.hexPolygonMargin(0.7)
|
||||
.hexPolygonMargin(0.62)
|
||||
.hexPolygonUseDots(true)
|
||||
.hexPolygonColor(() => 'rgba(255,255,255,0.65)')
|
||||
.hexPolygonColor(() => 'rgba(150,200,255,0.95)')
|
||||
.showAtmosphere(true)
|
||||
.atmosphereColor('#3b82f6')
|
||||
.atmosphereAltitude(0.16)
|
||||
.atmosphereColor('#7cc4ff')
|
||||
.atmosphereAltitude(0.22)
|
||||
|
||||
g.arcsData(ARCS)
|
||||
.arcStartLat((d: object) => (d as Arc).startLat)
|
||||
|
|
@ -63,14 +62,14 @@ function GlobeObject({ countries }: { countries: { features: object[] } }) {
|
|||
.pointRadius(0.55)
|
||||
.pointsMerge(true)
|
||||
|
||||
// material → deep navy with faint emissive
|
||||
// material → lighter, distinguishable blue sphere
|
||||
const mat = g.globeMaterial() as unknown as {
|
||||
color: Color; emissive: Color; emissiveIntensity: number; shininess: number
|
||||
}
|
||||
mat.color = new Color(NAVY)
|
||||
mat.emissive = new Color('#0a1f4d')
|
||||
mat.emissiveIntensity = 0.12
|
||||
mat.shininess = 0.8
|
||||
mat.color = new Color('#1b386e')
|
||||
mat.emissive = new Color('#23508f')
|
||||
mat.emissiveIntensity = 0.45
|
||||
mat.shininess = 0.6
|
||||
|
||||
return g
|
||||
}, [countries])
|
||||
|
|
@ -92,10 +91,10 @@ export function World() {
|
|||
|
||||
return (
|
||||
<Canvas camera={{ fov: 50, near: 180, far: 1800, position: [0, 0, 320] }} gl={{ alpha: true, antialias: true }}>
|
||||
<ambientLight color="#bcd4ff" intensity={0.9} />
|
||||
<directionalLight color="#ffffff" position={[-400, 200, 400]} intensity={1} />
|
||||
<directionalLight color="#22ade0" position={[300, 200, 200]} intensity={0.5} />
|
||||
<pointLight color="#ffffff" position={[-200, 500, 200]} intensity={0.7} />
|
||||
<ambientLight color="#dce9ff" intensity={1.6} />
|
||||
<directionalLight color="#ffffff" position={[-400, 200, 400]} intensity={1.6} />
|
||||
<directionalLight color="#6cc4ff" position={[300, 200, 200]} intensity={1} />
|
||||
<pointLight color="#ffffff" position={[-200, 500, 200]} intensity={1.1} />
|
||||
{countries && <GlobeObject countries={countries} />}
|
||||
<OrbitControls
|
||||
enablePan={false}
|
||||
|
|
|
|||
Loading…
Reference in New Issue