refined the overlay animation

This commit is contained in:
Anuj K 2025-09-03 14:47:15 +05:30
parent 23be78a855
commit a6ed2e731f
3 changed files with 8 additions and 8 deletions

View file

@ -8,9 +8,9 @@ const FluidSimShader = {
iTime: { value: 0.0 }, iTime: { value: 0.0 },
mouse: { value: new THREE.Vector3(-1, -1, 0.0) }, mouse: { value: new THREE.Vector3(-1, -1, 0.0) },
dissipation: { value: 0.950 }, // Slightly more persistent for trails dissipation: { value: 0.950 }, // Slightly more persistent for trails
tension: { value: 1.5 }, // Higher tension for stronger ripples tension: { value: 2.0 }, // Higher tension for stronger ripples
radius: { value: 10.0 }, // Larger splat radius radius: { value: 20.0 }, // Larger splat radius
trailLength: { value: 3 }, // Number of trailing ripples trailLength: { value: 5 }, // Number of trailing ripples
}, },
vertexShader: ` vertexShader: `
varying vec2 vUv; varying vec2 vUv;

View file

@ -59,7 +59,7 @@ distortionPass.material.uniforms.chromaticAmount.value = 0.002; // Enhanced chro
distortionPass.material.uniforms.lightIntensity.value = 1.5; distortionPass.material.uniforms.lightIntensity.value = 1.5;
distortionPass.material.uniforms.lightColor.value.set(1, 1, 1); // Cool blue-white distortionPass.material.uniforms.lightColor.value.set(1, 1, 1); // Cool blue-white
distortionPass.material.uniforms.normalStrength.value = 2.0; distortionPass.material.uniforms.normalStrength.value = 2.0;
distortionPass.material.uniforms.ambientLight.value = 0.15; distortionPass.material.uniforms.ambientLight.value = 1;
composer.addPass(distortionPass); composer.addPass(distortionPass);

View file

@ -1,7 +1,7 @@
import * as THREE from 'three'; import * as THREE from 'three';
export function createStarfield(scene) { export function createStarfield(scene) {
const starCount = 8000; const starCount = 12000;
const starDistance = 300; const starDistance = 300;
// Create geometry for stars // Create geometry for stars
@ -124,9 +124,9 @@ export function createStarfield(scene) {
const interpolationSpeed = 5; const interpolationSpeed = 5;
// NEW: Cursor brightness parameters // NEW: Cursor brightness parameters
const brightnessRadius = 60; // Radius for size increase effect const brightnessRadius = 600; // Radius for size increase effect
const maxSizeMultiplier = 4.0; // Maximum size increase (4x original size) const maxSizeMultiplier = 400.0; // Maximum size increase (4x original size)
const sizeInterpolationSpeed = 3.0; // Speed of size changes const sizeInterpolationSpeed = 100.0; // Speed of size changes
// Raycaster for mouse position in 3D space // Raycaster for mouse position in 3D space
const raycaster = new THREE.Raycaster(); const raycaster = new THREE.Raycaster();