EdgeLayer
Defined in: packages/sigma/src/rendering/edges/types.ts:333
EdgeLayer - defines a visual layer for the edge body.
Layers determine how the edge body is colored/textured. The simplest layer is plain solid color; more complex layers can implement dashes, gradients, or textures.
Multiple layers can be composited using alpha blending (TO BE DONE).
Properties
attributes
attributes:
AttributeSpecification[]
Defined in: packages/sigma/src/rendering/edges/types.ts:365
Additional per-edge attributes required by this layer.
glsl
glsl:
string
Defined in: packages/sigma/src/rendering/edges/types.ts:355
GLSL code defining the layer color function.
Function signature: vec4 layer_{name}(EdgeContext ctx)
The EdgeContext provides information about the current fragment:
- t: position along path [0, 1]
- sdf: signed distance from path centerline
- thickness: edge thickness
- edgeLength: total path length
- etc.
Returns: RGBA color for this fragment
lifecycle?
optionallifecycle?: (context) =>EdgeLifecycleHooks
Defined in: packages/sigma/src/rendering/edges/types.ts:370
Optional lifecycle factory for layers that need async resources.
Parameters
context
Returns
name
name:
string
Defined in: packages/sigma/src/rendering/edges/types.ts:338
Unique identifier for this layer type (e.g., “plain”, “dashed”, “gradient”). Used to generate GLSL function names: layer_{name}
uniforms
uniforms:
UniformSpecification[]
Defined in: packages/sigma/src/rendering/edges/types.ts:360
Additional uniforms required by this layer.