Log inGet started
◇
component · drop-in viewer
asset⌬ componentcomponentprimary: init.luau·originates fromworld a333e7c2-f…

SeaOcean

The circuit's sea. Adds the ocean simulation to an entity and drives it from the world-local ocean module, whose surface shader samples the scene captures with an explicit mip level so the browser's WebGPU uniformity analysis accepts it.

byzero-proxy @ DESKTOP-DB3UJOJ·posted 2mo ago
What it does

SeaOcean

The circuit's sea. Adds the ocean simulation to an entity and drives it from the world-local ocean module, whose surface shader samples the scene captures with an explicit mip level so the browser's WebGPU uniformity analysis accepts it.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

Ocean Component Puts a live sea on an entity. The component IS the ocean's authored form: its fields name a sea state and a quality tier, and everything else — the wave simulation, the clipmap surface, the material bound to the simulation's output — is rebuilt from them whenever the component wakes. That rebuild is the point. The simulation lives entirely in GPU buffers and a runtime mesh, none of which survive an engine restart; what persists is this component's settings, from which the whole sea is reconstructed. So a scene with an ocean in it reloads into the same sea rather than into a dangling reference to a mesh that no longer exists. The surface follows the viewer and reaches to the horizon, so one ocean is the whole sea however far anyone sails. Query where the water is with `sampleHeight` / `sampleDisplacement` — the same waves that are drawn.

differs(a: number, b: number) → boolean

Values round-trip through f32, so an authored 1.3 does not survive `==`.

argtypedescription
anumber
bnumber

config( ) → any

awake( ) → void

update(_dt: number) → void

One of the sea's two drivers (the other is the module's own loop, which covers a paused engine). The engine owns this update, so stepping survives a reload of the ocean module and stops the moment the component goes away.

argtypedescription
_dtnumber

onDestroy( ) → void

refresh( ) → void

Re-read every field and rebuild the sea from it. Call after changing fields at runtime; the editor's own field edits already trigger it.

examples

ocean:refresh()

sampleHeight(x: number, z: number) → number

The height of the water surface at a world XZ position — what a body floating there rests at.

argtypedescription
xnumberWorld X.
znumberWorld Z.

examples

local y = ocean:sampleHeight(boat.position.x, boat.position.z)

sampleDisplacement(x: number, z: number) →

The full displacement of the water surface at a world XZ position, including the horizontal shift that choppiness applies to crests.

argtypedescription
xnumberWorld X.
znumberWorld Z.

examples

local p = ocean:sampleDisplacement(0, 0)
⌬ Metadata
descriptionThe circuit's sea: the ocean simulation bound to the world-local ocean module and surface shader.

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

Showing up to 3 levels deep. Open a part to see what it holds further down.

7+items
▣
module · born here
❒asset
# ocean The circuit's ocean simulation: spectrum, evolution, FFT, assembly, normals, displacement, probes and foam, plus the surface material it drives. It resolves its compute shaders from the builtin oceans package and its surface shader from `rainline.water.seaSurface`.
▲ 0↑ born
backing path · rainline/water/SeaOcean.component

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported on this asset or on the parts this page shows. Parts it leaves out are not counted here.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.