AttachmentManager
Defined in: packages/sigma/src/rendering/nodes/attachments/attachment-manager.ts:24
Constructors
Constructor
new AttachmentManager(
gl,renderers,scheduleRender):AttachmentManager
Defined in: packages/sigma/src/rendering/nodes/attachments/attachment-manager.ts:37
Parameters
gl
WebGL2RenderingContext
renderers
Record<string, LabelAttachmentRenderer>
scheduleRender
() => void
Returns
AttachmentManager
Methods
bindTexture()
bindTexture(
textureUnit):void
Defined in: packages/sigma/src/rendering/nodes/attachments/attachment-manager.ts:146
Binds the atlas texture to the given WebGL texture unit.
Parameters
textureUnit
number
Returns
void
clear()
clear():
void
Defined in: packages/sigma/src/rendering/nodes/attachments/attachment-manager.ts:181
Clears all cached data and textures.
Returns
void
getEntry()
getEntry(
node,attachmentName):AtlasEntry|null
Defined in: packages/sigma/src/rendering/nodes/attachments/attachment-manager.ts:156
Returns atlas entry for a cached attachment, or null if not packed yet.
Parameters
node
string
attachmentName
string
Returns
AtlasEntry | null
invalidateNode()
invalidateNode(
node):void
Defined in: packages/sigma/src/rendering/nodes/attachments/attachment-manager.ts:164
Invalidates cached and in-flight attachments for a node (e.g., on state change).
Parameters
node
string
Returns
void
kill()
kill():
void
Defined in: packages/sigma/src/rendering/nodes/attachments/attachment-manager.ts:192
Full cleanup — releases GL resources and drops references for GC.
Returns
void
regenerateAtlas()
regenerateAtlas():
void
Defined in: packages/sigma/src/rendering/nodes/attachments/attachment-manager.ts:91
Packs all cached attachments into atlas textures and uploads to GL. Uploads the canvas directly (preserving premultiplied alpha). No-op when nothing has changed since the last call.
Returns
void
renderAttachment()
renderAttachment(
node,attachmentName,context):void
Defined in: packages/sigma/src/rendering/nodes/attachments/attachment-manager.ts:57
Invokes the renderer for a node attachment if not already cached or pending. Sync content starts an async canvas conversion; async content (Promise) is awaited. In both cases the result is stored when ready and a re-render is scheduled via the callback provided at construction.
Parameters
node
string
attachmentName
string
context
LabelAttachmentContext
Returns
void