Skip to content

eulerjs API / @eulerjs/marine/webgpu / RingLodOptions

RingLodOptions ​

Defined in: packages/marine/src/webgpu/RingLod.ts:12

Extends ​

Properties ​

PropertyTypeDescriptionInherited fromDefined in
cellsAcross?numberCells across each level, a multiple of 4. Defaults to 64.-packages/marine/src/webgpu/RingLod.ts:16
color?ColorThe colour of the water looked into, lit by the sky. Defaults to a light sea blue: lighter than the open ocean's, which is all but black.SpectralWaterMaterialOptions.colorpackages/marine/src/webgpu/waterMaterial.ts:11
environment?Texture<unknown, TextureEventMap>The sky, as PMREMGenerator makes it, best without the sun's disc in it. Given it, the water is shaded as water looks: a mirror of the sky by Fresnel's law (a fiftieth looking straight down, all of it at grazing angles, so the sea pales toward the horizon), over the deep water's colour, with the sun glinting off it. Without it, it is a MeshPhysicalNodeMaterial lit by the scene's lights and environment.SpectralWaterMaterialOptions.environmentpackages/marine/src/webgpu/waterMaterial.ts:35
finestSpacing?numberMetres between vertices nearest the centre. Defaults to 0.25.-packages/marine/src/webgpu/RingLod.ts:14
foamAmount?numberHow much of the foam GpuWaveFields keeps is drawn, 0 for none. Defaults to 1.SpectralWaterMaterialOptions.foamAmountpackages/marine/src/webgpu/waterMaterial.ts:17
foamLowest?numberHow far down a wave foam reaches before it is gone, as a height over half the significant wave height: 0, the still water's level; 0.5, halfway up a typical crest. Defaults to -0.15, a little below it, so foam trails a way down the backs of the waves.SpectralWaterMaterialOptions.foamLowestpackages/marine/src/webgpu/waterMaterial.ts:27
foamPeakBoost?numberHow many times more foam there is on a wave's peak than its Jacobian alone makes. Defaults to 2.8.SpectralWaterMaterialOptions.foamPeakBoostpackages/marine/src/webgpu/waterMaterial.ts:21
foamSubtract?readonly number[]Taken off each patch's foam, from the largest, before they are added up: to clear the faint foam a patch leaves all over. Defaults to none.SpectralWaterMaterialOptions.foamSubtractpackages/marine/src/webgpu/waterMaterial.ts:19
levelCount?numberLevels, each with twice the spacing and twice the reach of the one inside it. Defaults to 16, reaching 0.25 × 32 × 2¹⁵ m, about 260 km.-packages/marine/src/webgpu/RingLod.ts:18
reachOverHeight?numberThe finest level drawn reaches at least this many times the centre's height, so that from high up the finest levels are left out. Defaults to 2.-packages/marine/src/webgpu/RingLod.ts:20
scatter?numberHow much light the water scatters back, 0 for none. Defaults to 1.SpectralWaterMaterialOptions.scatterpackages/marine/src/webgpu/waterMaterial.ts:15
scatterColor?ColorThe colour of the light the water scatters back, brightest through the crests and looked into toward the sun. Defaults to a turquoise.SpectralWaterMaterialOptions.scatterColorpackages/marine/src/webgpu/waterMaterial.ts:13
sunColor?ColorThe glint's colour and brightness, with environment: the sun is far brighter than the sky. Defaults to a warm white, 150.SpectralWaterMaterialOptions.sunColorpackages/marine/src/webgpu/waterMaterial.ts:39
sunDirection?Vector3Toward the sun, for its glint, with environment. Defaults to straight up.SpectralWaterMaterialOptions.sunDirectionpackages/marine/src/webgpu/waterMaterial.ts:37
sunLight?ColorThe sun's light on the water, which it scatters back and lights the foam with, with environment. Defaults to a warm white, 2.5.SpectralWaterMaterialOptions.sunLightpackages/marine/src/webgpu/waterMaterial.ts:41

Released under the MIT License.