feat: holographic Earth slowly rotating above the Nexus
- 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:
20
app.js
20
app.js
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user