@kayahr/wastelib
    Preparing search index...

    Class Tileset

    Container for a set of tiles read from the ALLHTDS1 or ALLHTDS2 file.

    Implements

    Index

    Constructors

    • Creates a new tileset with the given tiles.

      Parameters

      • tiles: Tile[]

        The tiles in this set.

      • disk: number

        The disk number.

      Returns Tileset

    Methods

    • Returns the tile with the given index.

      Parameters

      • index: number

        The index of the tile image to return.

      Returns Tile

      The tile image.

      RangeError if the index is out of bounds.

    • Reads a single tileset block from the given array.

      Parameters

      • array: Uint8Array

        The array to read the tileset from.

      • offset: number

        The byte offset of the tileset block.

      Returns Tileset

      The read tileset.