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
new RingLod(fields, options?): RingLod;Defined in: packages/marine/src/webgpu/RingLod.ts:56
Parameters
| Parameter | Type |
|---|---|
fields | GpuWaveFields |
options? | RingLodOptions |
Returns
RingLod
Overrides
Group.constructorProperties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
cellsAcross | readonly | number | packages/marine/src/webgpu/RingLod.ts:48 |
finestSpacing | readonly | number | packages/marine/src/webgpu/RingLod.ts:47 |
levelCount | readonly | number | packages/marine/src/webgpu/RingLod.ts:49 |
material | readonly | SpectralWaterMaterial | packages/marine/src/webgpu/RingLod.ts:51 |
reachOverHeight | readonly | number | packages/marine/src/webgpu/RingLod.ts:50 |
Accessors
drawCallCount
Get Signature
get drawCallCount(): number;Defined in: packages/marine/src/webgpu/RingLod.ts:154
Returns
number
reach
Get Signature
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
get triangleCount(): number;Defined in: packages/marine/src/webgpu/RingLod.ts:146
Triangles drawn, for comparisons.
Returns
number
Methods
update()
update(centre): void;Defined in: packages/marine/src/webgpu/RingLod.ts:105
Places the levels around centre: the viewer, usually.
Parameters
| Parameter | Type |
|---|---|
centre | Vector3 |
Returns
void
