Skip to content

Commit d44c7c7

Browse files
committed
fix: update ocean wave configuration for improved rendering and visual appeal
1 parent e07275e commit d44c7c7

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/animations/oceanWaves.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ import {
1313
describe('DEFAULT_OCEAN_CONFIG', () => {
1414
test('has expected structure and values', () => {
1515
expect(DEFAULT_OCEAN_CONFIG).toEqual({
16-
layers: 10,
16+
layers: 12,
1717
noiseScale: 0.003,
1818
amplitude: 80,
1919
waveSpeed: 0.008,
2020
foamThreshold: 0.7,
21-
perspective: 0.08,
21+
perspective: 0.06,
2222
});
2323
});
2424

src/animations/oceanWaves.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,12 @@ export interface FoamParticle {
154154
* Balanced for visual appeal with moderate wave motion
155155
*/
156156
export const DEFAULT_OCEAN_CONFIG: OceanWaveConfig = {
157-
layers: 10,
157+
layers: 12,
158158
noiseScale: 0.003,
159159
amplitude: 80,
160160
waveSpeed: 0.008,
161161
foamThreshold: 0.7,
162-
perspective: 0.08,
162+
perspective: 0.06,
163163
};
164164

165165
/**

src/components/apps/OceanWaves.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
// Wave layer positioning (proportional to canvas size)
3131
const LAYER_DEPTH_START = -200; // Starting z position for farthest layer
3232
const LAYER_DEPTH_SPACING = 100; // Z-distance between layers
33-
const VIEWER_ALTITUDE = 0.8; // Horizon altitude (0 = top of canvas, 1 = bottom, 0.8 = bottom 1/5th)
34-
const WAVE_EXTENT = 0.15; // Vertical span of wave layers (proportion of height)
33+
const VIEWER_ALTITUDE = 0.55; // Horizon altitude (0 = top of canvas, 1 = bottom, 0.55 = middle)
34+
const WAVE_EXTENT = 0.4; // Vertical span of wave layers (proportion of height)
3535
3636
// Wave rendering quality
3737
const WAVE_RESOLUTION = 120; // Number of points per wave (higher = smoother)

0 commit comments

Comments
 (0)