dino-ge
    Preparing search index...

    Represents a grid-based map rendered from a tileset.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    data: number[][]

    2D array of tile indices.

    id: string = ...

    Unique identifier for the game object.

    tileset: HTMLImageElement

    The source image for the tileset.

    tilesetCols: number

    Number of columns in the tileset image.

    tileSize: number

    Tile size in pixels.

    _registry: typeof default = Registry

    Static helper for tests to bypass Registry circularity if mocked.

    Accessors

    Methods

    • Emits a custom event on this object's event bus.

      Parameters

      • type: string

        The event type.

      • Optionaldetail: unknown

        Optional data to pass with the event.

      Returns void

    • Stops listening for an event on this object's event bus.

      Parameters

      • type: string

        The event type.

      • callback: (event: CustomEvent) => void

        The function to remove.

      Returns void

    • Listens for an event on this object's event bus.

      Parameters

      • type: string

        The event type.

      • callback: (event: CustomEvent) => void

        The function to run when the event occurs.

      Returns void