Taos API Reference
    Preparing search index...

    Class ShelfPacker

    Packs same-ish-height rectangles left-to-right into shelves of a fixed-width atlas, growing the height as needed. Simple and good enough for a one-shot glyph set (not online repacking).

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    width: number

    Accessors

    • get height(): number

      Total height used (next power-of-two-friendly value is the caller's call).

      Returns number

    Methods

    • Reserves a w×h cell, returning its top-left. Advances shelves as rows fill.

      Parameters

      • w: number
      • h: number

      Returns { x: number; y: number }