Skip to content

eulerjs API / @eulerjs/marine/webgpu / RingLod

RingLod ​

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

The sea as a geometry clipmap (Losasso and Hoppe 2004): square rings around the centre, each with twice the vertex spacing of the one inside it, every level snapped to its own grid so that vertices stay put on the sea as the centre moves. Snapping leaves the hole in each ring one cell off from the level inside it on two sides; thin trims fill it. The outer band of every level morphs onto the coarser grid, so the rings meet without cracks.

Every ring is one mesh, as is each trim: about three draw calls a level, and the same triangles however the centre moves.

Extends ​

  • Group

Constructors ​

Constructor ​

ts
new RingLod(fields, options?): RingLod;

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

Parameters ​

ParameterType
fieldsGpuWaveFields
options?RingLodOptions

Returns ​

RingLod

Overrides ​

ts
Group.constructor

Properties ​

PropertyModifierTypeDefined in
cellsAcrossreadonlynumberpackages/marine/src/webgpu/RingLod.ts:48
finestSpacingreadonlynumberpackages/marine/src/webgpu/RingLod.ts:47
levelCountreadonlynumberpackages/marine/src/webgpu/RingLod.ts:49
materialreadonlySpectralWaterMaterialpackages/marine/src/webgpu/RingLod.ts:51
reachOverHeightreadonlynumberpackages/marine/src/webgpu/RingLod.ts:50

Accessors ​

drawCallCount ​

Get Signature ​

ts
get drawCallCount(): number;

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

Returns ​

number


reach ​

Get Signature ​

ts
get reach(): number;

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

Metres from the centre to the edge of the outermost level.

Returns ​

number


triangleCount ​

Get Signature ​

ts
get triangleCount(): number;

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

Triangles drawn, for comparisons.

Returns ​

number

Methods ​

update() ​

ts
update(centre): void;

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

Places the levels around centre: the viewer, usually.

Parameters ​

ParameterType
centreVector3

Returns ​

void

Released under the MIT License.