Skip to content
sigma.js sigma.js
v4.0.6 Docs Examples GitHub 12.2K

AttributeSpecification

Defined in: packages/sigma/src/rendering/nodes/types.ts:63

Specification for a vertex attribute.

optional defaultValue?: string | number | boolean

Defined in: packages/sigma/src/rendering/nodes/types.ts:96

Default value to use when the source attribute is missing from node data. For size=1: a number or boolean (packed as 1/0) For size=4 with normalized: a CSS color string (e.g., “#ff0000”)


name: string

Defined in: packages/sigma/src/rendering/nodes/types.ts:67

Name of the attribute in the shader (e.g., “a_borderSize”).


optional normalized?: boolean

Defined in: packages/sigma/src/rendering/nodes/types.ts:82

Whether the attribute should be normalized when passed to the shader.


size: 1 | 2 | 3 | 4

Defined in: packages/sigma/src/rendering/nodes/types.ts:72

Number of components (e.g., 1 for float, 2 for vec2, 3 for vec3, 4 for vec4).


optional source?: string

Defined in: packages/sigma/src/rendering/nodes/types.ts:89

Name of the node attribute to read from in NodeDisplayData. If not specified, defaults to the shader attribute name without ‘a_’ prefix. For example, if source is “borderColor”, the value is read from data.borderColor.


type: number

Defined in: packages/sigma/src/rendering/nodes/types.ts:77

WebGL data type (e.g., FLOAT, UNSIGNED_BYTE).