ThreePipe
    Preparing search index...

    Function createWidgetIconTexture

    • Draws the icon of a kind (getWidgetIconShapes) on a square canvas of texels and returns it as an sRGB texture, premultiplied, without mipmaps. 'icon' draws all shapes but the dot, 'dot' only the dot, in white (the sprite colour tints it), at the same place in the same square. The caller owns the texture and disposes it. undefined where there is no 2D canvas (Node.js without a canvas polyfill).

      Parameters

      • kind: WidgetKind
      • texels: number
      • layer: "icon" | "dot" = 'icon'

      Returns CanvasTexture | undefined