AttachmentManager
Defined in: packages/sigma/src/rendering/nodes/attachments/attachment-manager.ts:24
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AttachmentManager(
gl,renderers,scheduleRender):AttachmentManager
Defined in: packages/sigma/src/rendering/nodes/attachments/attachment-manager.ts:37
Parameters
Section titled “Parameters”WebGL2RenderingContext
renderers
Section titled “renderers”Record<string, LabelAttachmentRenderer>
scheduleRender
Section titled “scheduleRender”() => void
Returns
Section titled “Returns”AttachmentManager
Methods
Section titled “Methods”bindTexture()
Section titled “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
Section titled “Parameters”textureUnit
Section titled “textureUnit”number
Returns
Section titled “Returns”void
clear()
Section titled “clear()”clear():
void
Defined in: packages/sigma/src/rendering/nodes/attachments/attachment-manager.ts:187
Clears all cached data and textures.
Returns
Section titled “Returns”void
getEntry()
Section titled “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
Section titled “Parameters”string
attachmentName
Section titled “attachmentName”string
Returns
Section titled “Returns”AtlasEntry | null
invalidateNode()
Section titled “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
Section titled “Parameters”string
Returns
Section titled “Returns”void
kill()
Section titled “kill()”kill():
void
Defined in: packages/sigma/src/rendering/nodes/attachments/attachment-manager.ts:198
Full cleanup — releases GL resources and drops references for GC.
Returns
Section titled “Returns”void
regenerateAtlas()
Section titled “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
Section titled “Returns”void
renderAttachment()
Section titled “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
Section titled “Parameters”string
attachmentName
Section titled “attachmentName”string
context
Section titled “context”Returns
Section titled “Returns”void
restore()
Section titled “restore()”restore():
void
Defined in: packages/sigma/src/rendering/nodes/attachments/attachment-manager.ts:179
Drops the dead GL texture after a context loss, for the next atlas pass to repack.
Returns
Section titled “Returns”void