layerFill
layerFill(
options?):FragmentLayer
Defined in: packages/sigma/src/rendering/nodes/layers/fill.ts:45
Creates a fill layer that fills the shape with a color. This is typically the base layer for most node programs.
Parameters
options?
Optional configuration
Returns
Fill layer definition
Example
// Use node color (default)const program = createNodeProgram({ shapes: [sdfCircle()], layers: [layerFill()],});
// Use fixed colorconst redProgram = createNodeProgram({ shapes: [sdfCircle()], layers: [layerFill({ color: "#ff0000" })],});
// Use a custom attributeconst customProgram = createNodeProgram({ shapes: [sdfCircle()], layers: [layerFill({ color: { attribute: "fillColor" } })],});