Abyss.component
README.md
Abyss
The medium and the place DEADLIGHT is filmed in, as one component on one
entity. It owns the whole abyss slice and joins the film's clock in awake():
- the absence of a sky and of a sun — the engine renders both with no entity in the scene for either, and this film has neither;
- the water's optics — per-channel extinction and the colour of the column, written once per film frame from one number;
- the seafloor — a silt plain carrying the long dunes, with every ripple mark computed per pixel;
- everything suspended in the water — marine snow, the silt the vehicle lifts, the amphipod boil, the corrosion dust;
- the water column of movement I — the sea's underside, the sunball through it, the caustic net and the shafts;
- the life — a shoal, a siphonophore, a comb jelly, a sea cucumber, a rattail, a squat lobster, a shrimp, and the bioluminescent flashes.
Everything it builds is spawned temporary, so none of it enters scene.json
and none of it collides with the other three slices' pending edits; the
component rebuilds it on every awake instead.
buildOnWake off inspects what is already there without paying for a rebuild.
rebuild() tears the slice down and puts it back — the call to make after
editing a shader or a curve. observe() reports what the slice is holding: the
water's optics at the current instant, every emitter's population, the plain's
triangle count and how many bodies are on screen.
The scrub problem
Film.seek(t) runs the clock from zero to t at the fixed step inside ONE
rendered frame, so a slice's tick can fire two thousand times before the GPU
draws anything, and an emitter stepped that many times queues two thousand
dispatches and wedges the engine. The component counts rendered frames of its
own and tells the emitters whether the film frame they are being handed is a
real one. During a scrub they are left alone; the frame after it lands, they are
caught up over a bounded run of real steps.