eulerjs API / @eulerjs/marine / SumOfSinesOptions
SumOfSinesOptions
Defined in: packages/marine/src/waves/SumOfSines.ts:3
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
amplitude? | number | Amplitude the series starts from, in metres. | packages/marine/src/waves/SumOfSines.ts:9 |
amplitudeFalloff? | number | Each wave's amplitude is this fraction of the previous one's. | packages/marine/src/waves/SumOfSines.ts:11 |
directionBias? | Vector2 | Added to every direction before normalising, so waves lean toward it (x, z). | packages/marine/src/waves/SumOfSines.ts:23 |
directionSeed? | number | Angle (radians) the first wave's direction is derived from. | packages/marine/src/waves/SumOfSines.ts:19 |
directionStep? | number | Added to the direction angle after each wave, scattering the waves' directions. | packages/marine/src/waves/SumOfSines.ts:21 |
fullSamplesPerPeriod? | number | ...and is fully present from this many. | packages/marine/src/waves/SumOfSines.ts:40 |
gravity? | number | Gravitational acceleration used for the phase speeds, in m/s². | packages/marine/src/waves/SumOfSines.ts:17 |
inversionIterations? | number | Fixed-point iterations used to find the undisplaced point under a world position. | packages/marine/src/waves/SumOfSines.ts:42 |
minSamplesPerPeriod? | number | A wave fades in from this many grid samples per period... | packages/marine/src/waves/SumOfSines.ts:38 |
peakOffset? | number | - | packages/marine/src/waves/SumOfSines.ts:26 |
peakSharpness? | number | How peaked the crests are: each wave is exp(peakSharpness * sin(phase) - peakOffset). | packages/marine/src/waves/SumOfSines.ts:25 |
sampleSpacing? | number | The finest detail the physics resolves, as the spacing of an imaginary sample grid in metres. Waves too short for that grid fade out of the physics surface, matching what the water mesh renders at its finest level of detail. | packages/marine/src/waves/SumOfSines.ts:36 |
speedFactor? | number | Scales the deep-water phase speed sqrt(g λ / 2π) of every wave. | packages/marine/src/waves/SumOfSines.ts:15 |
timeOffset? | number | Added to the simulation time before evaluating the waves, so they don't all start in phase. | packages/marine/src/waves/SumOfSines.ts:28 |
timeScale? | number | Speeds up (> 1) or slows down (< 1) the waves. | packages/marine/src/waves/SumOfSines.ts:30 |
waveCount? | number | Number of waves. Each is shorter and lower than the one before. | packages/marine/src/waves/SumOfSines.ts:5 |
wavelength? | number | Wavelength the series starts from, in metres; the first wave is already one falloff shorter. | packages/marine/src/waves/SumOfSines.ts:7 |
wavelengthFalloff? | number | Each wave's wavelength is this fraction of the previous one's. | packages/marine/src/waves/SumOfSines.ts:13 |
