zeroed-some/dougk / b78d533

Browse files

simplify the water

Authored by espadonne
SHA
b78d5339fe64d3d631dde69c0d5ab43e025d7dd4
Parents
2633708
Tree
1f92cd6

1 changed file

StatusFile+-
M src/renderers/three/pond.js 2 22
src/renderers/three/pond.jsmodified
@@ -49,16 +49,13 @@ export function createPond(scene, gradientMap) {
4949
   sand.position.y = -0.02
5050
   group.add(sand)
5151
 
52
-  // Water surface - higher resolution for wave animation
53
-  const waterGeom = new THREE.CircleGeometry(radius, 48, 8)
52
+  // Water surface
53
+  const waterGeom = new THREE.CircleGeometry(radius, 32)
5454
   waterGeom.rotateX(-Math.PI / 2)
5555
   const water = new THREE.Mesh(waterGeom, waterMaterial)
5656
   water.position.y = 0
5757
   group.add(water)
5858
 
59
-  // Store original water vertex positions for wave animation
60
-  const waterPositions = waterGeom.attributes.position.array.slice()
61
-
6259
   // Water depth visual (darker center with gradient)
6360
   const deepGeom = new THREE.CircleGeometry(radius * 0.7, 32)
6461
   deepGeom.rotateX(-Math.PI / 2)
@@ -436,23 +433,6 @@ export function createPond(scene, gradientMap) {
436433
   let smokeSpawnTimer = 0
437434
 
438435
   function update(delta, elapsed) {
439
-    // Animate water surface waves
440
-    const positions = waterGeom.attributes.position.array
441
-    for (let i = 0; i < positions.length; i += 3) {
442
-      const x = waterPositions[i]
443
-      const z = waterPositions[i + 2]
444
-      const dist = Math.sqrt(x * x + z * z)
445
-
446
-      // Gentle concentric waves from center (main ripple)
447
-      const wave1 = Math.sin(dist * 1.2 - elapsed * 1.5) * 0.025
448
-      // Secondary offset ripple (different origin point for natural look)
449
-      const dist2 = Math.sqrt((x - 1) * (x - 1) + (z + 0.5) * (z + 0.5))
450
-      const wave2 = Math.sin(dist2 * 1.4 - elapsed * 1.8) * 0.015
451
-
452
-      positions[i + 1] = waterPositions[i + 1] + wave1 + wave2
453
-    }
454
-    waterGeom.attributes.position.needsUpdate = true
455
-
456436
     // Animate water highlight
457437
     highlight.position.x = -radius * 0.35 + Math.sin(elapsed * 0.5) * 0.3
458438
     highlight.position.z = -radius * 0.35 + Math.cos(elapsed * 0.5) * 0.3