layers
The layers namespace is the generic runtime layer registry. Mount, update,
and unmount any LayerRenderer on a live <GraphCanvas> with no JSX and no
engine-core changes — the same mechanism the built-in coverage and marker layers
ride on.
api.layers.mount(name, factory, config, opts?); // factory: () => LayerRenderer
api.layers.update(name, config);
api.layers.unmount(name);
api.layers.has(name); // mounted or pending?
api.layers.list();
Mounting is idempotent by name, and mounts issued before the canvas is wired are
queued and hydrate automatically once the engine is up. Pass { frame: true }
to register a per-frame tick.
The quickest way to author a custom node visual is
createNodeShaderLayer, which turns a
fragment shader into a LayerRenderer you mount here. To build anything else,
see Authoring custom layers.