DomProjectionSystem
The DOM's Projection system: layer builds it, writing through the Environment's
FlushGate, and make builds it over any sink, for a binding that wires it itself. Only a binding's
layout feature imports it, so a page that never lays out ships none of it. Closing its Scope stops the
engine: its run, its observers and listeners, and what it forked. Built after the gate, it ends before
it.
import * as DomProjectionSystem from "@wardic/dom/DomProjectionSystem"
const layout = DomProjectionSystem.layer().pipe(Layer.provide(FlushGate.layer({ batch: (apply) => apply() })))Variables
make
const make: (sink, options?) => Effect.Effect<Context.Context<
| ProjectionSystem
| PassEnds>, never, Services | Scope.Scope>;Build the engine over sink, the context's Frame loop and Renderer, in the current Scope: what
it forks runs in that Scope, and closing it ends the engine. It's the ProjectionSystem in the
context it gives, beside what a Reorder controller over it needs.
Parameters
sink
options?
Returns
Effect.Effect<Context.Context<
| ProjectionSystem
| PassEnds>, never, Services | Scope.Scope>
Functions
layer()
function layer(options?): Layer<
| ProjectionSystem
| PassEnds, never, any>;The engine as a Layer, writing through the Environment's FlushGate: built by make, ended by the Layer's Scope.
Parameters
options?
Returns
Layer<
| ProjectionSystem
| PassEnds, never, any>