feat: holographic Earth slowly rotating above the Nexus
Some checks failed
CI / validate (pull_request) Failing after 16s
CI / auto-merge (pull_request) Has been skipped

- Procedural holographic Earth using simplex-noise continent shader
  with scan lines, Fresnel rim glow, lat/lon grid overlay and
  atmosphere shell (all pre-existing in main)
- Add gentle vertical float animation to earthGroup (±0.6 u, 28 s period)
- Add faint tether beam from Earth down to Nexus platform centre

Fixes #236

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Alexander Whitestone
2026-03-24 01:13:36 -04:00
parent 668a69ecc9
commit abfb416814

20
app.js
View File

@@ -1446,6 +1446,23 @@ earthGroup.traverse(obj => {
if (obj.isMesh || obj.isLine) obj.userData.zoomLabel = 'Planet Earth';
});
// Tether beam — faint line connecting Earth to the Nexus platform center
(function buildEarthTetherBeam() {
const pts = [
new THREE.Vector3(0, EARTH_Y - EARTH_RADIUS * 1.15, 0),
new THREE.Vector3(0, 0.5, 0),
];
const beamGeo = new THREE.BufferGeometry().setFromPoints(pts);
const beamMat = new THREE.LineBasicMaterial({
color: NEXUS.colors.accent,
transparent: true,
opacity: 0.08,
depthWrite: false,
blending: THREE.AdditiveBlending,
});
scene.add(new THREE.Line(beamGeo, beamMat));
})();
// === WARP TUNNEL EFFECT ===
const WarpShader = {
uniforms: {
@@ -1837,10 +1854,11 @@ function animate() {
rune.sprite.material.opacity = 0.65 + Math.sin(elapsed * 1.2 + rune.floatPhase) * 0.2;
}
// Animate holographic Earth — slow axial rotation, glow pulse
// Animate holographic Earth — slow axial rotation, gentle float, glow pulse
earthMesh.rotation.y = elapsed * EARTH_ROTATION_SPEED;
earthSurfaceMat.uniforms.uTime.value = elapsed;
earthGlowLight.intensity = 0.30 + Math.sin(elapsed * 0.7) * 0.12;
earthGroup.position.y = EARTH_Y + Math.sin(elapsed * 0.22) * 0.6;
// === WEATHER PARTICLE ANIMATION ===
if (rainParticles.visible) {