Function paintChunkPixels

  • Per-pixel render of one chunk into a packed-RGBA pixel buffer.

    Hot path. Exposed for testing and for advanced consumers that want to drive their own DynamicTexture / canvas pipeline. Each pixel costs one byte read from bitmapData, one indexed read from colorLut, and one 32-bit write to pixels32 — vs the naive 1 Map.get + 4 byte writes per pixel that this replaced.

    bitmapData and pixels32 must have the same length (number of pixels in the chunk). colorLut is indexed by material id (256 entries; colorLut[0] is air = 0, colorLut[id > 0] is the packed-RGBA value for that material).

    Parameters

    • bitmapData: Uint8Array
    • pixels32: Uint32Array
    • colorLut: Uint32Array

    Returns void