diff --git a/app.js b/app.js index 9f79f6f..e58d86e 100644 --- a/app.js +++ b/app.js @@ -1219,7 +1219,12 @@ function animateEnergyBeam() { energyBeamMaterial.opacity = 0.3 + pulseEffect * 0.4; } -// === RESIZE HANDLER === + // Update energy beam pulse + beamPulse += 0.02; + energyBeam.material.opacity = 0.6 + Math.sin(beamPulse) * 0.2; + + // === RESIZE HANDLER === + window.addEventListener('resize', () => { camera.aspect = window.innerWidth / window.innerHeight; camera.updateProjectionMatrix(); @@ -1228,6 +1233,26 @@ window.addEventListener('resize', () => { }); // === SOVEREIGNTY METER === + +// === BATCAVE TERMINAL ENERGY BEAM === +// Vertical energy beam representing connection between Timmy and the outside world +const beamGeometry = new THREE.CylinderGeometry(0.2, 0.5, 100, 32); +const beamMaterial = new THREE.MeshBasicMaterial({ + color: NEXUS.colors.accent, + emissive: NEXUS.colors.accent, + emissiveIntensity: 0.8, + transparent: true, + opacity: 0.6, + blending: THREE.AdditiveBlending, + side: THREE.DoubleSide, + depthWrite: false +}); +const energyBeam = new THREE.Mesh(beamGeometry, beamMaterial); +energyBeam.position.set(10, 50, 10); // Positioned at Batcave terminal area +scene.add(energyBeam); + +// Animation variable for beam pulse effect +let beamPulse = 0; // Holographic arc gauge floating above the platform; reads from sovereignty-status.json const sovereigntyGroup = new THREE.Group(); sovereigntyGroup.position.set(0, 3.8, 0);