@lightningjs/renderer
    Preparing search index...

    Variable SdfTextRendererConst

    SdfTextRenderer: {
        clearCache: () => void;
        font: FontHandler;
        init: (stage: Stage) => void;
        renderQuads: (
            renderer: CoreRenderer,
            layout: TextLayout,
            _vertexBuffer: null | Float32Array<ArrayBufferLike>,
            renderProps: TextRenderProps,
        ) => void;
        renderText: (props: CoreTextNodeProps) => TextRenderInfo;
        type: "sdf";
    } = ...

    SDF Text Renderer - implements TextRenderer interface

    Type Declaration

    • clearCache: () => void
    • font: FontHandler
    • init: (stage: Stage) => void
    • renderQuads: (
          renderer: CoreRenderer,
          layout: TextLayout,
          _vertexBuffer: null | Float32Array<ArrayBufferLike>,
          renderProps: TextRenderProps,
      ) => void

      Submit SDF glyphs to the renderer's shared batched buffer. Called from CoreTextNode during rendering.

      Three paths:

      1. Exact cache hit — layout, transform, color, and alpha haven't changed. The cached pre-transformed Float32Array is mem-copied directly into the shared SDF buffer (no per-glyph matrix math).
      2. Translation hit — only tx/ty changed (the scroll path). The cached vertices are copied with the position delta applied; the cache keeps its original base so nothing is re-snapshotted.
      3. Cache miss — re-computes per-glyph world-space vertices via addSdfQuads, then snapshots the result into the cache.
    • renderText: (props: CoreTextNodeProps) => TextRenderInfo

      SDF text renderer using MSDF/SDF fonts with WebGL

    • type: "sdf"