Class TMXRenderer

The map renderer base class

Hierarchy (view full)

Constructors

  • Parameters

    • cols: number

      width of the tilemap in tiles

    • rows: number

      height of the tilemap in tiles

    • tilewidth: number

      width of each tile in pixels

    • tileheight: number

      height of each tile in pixels

    Returns TMXRenderer

Properties

bounds: Bounds
cols: number
rows: number
tileheight: number
tilewidth: number

Methods

  • return the tile position corresponding to the specified pixel

    Parameters

    • x: number

      X coordinate

    • y: number

      Y coordinate

    • Optionalv: any

      an optional vector object where to put the return values

    Returns Vector2d

  • return the pixel position corresponding of the specified tile

    Parameters

    • col: number

      tile horizontal position

    • row: number

      tile vertical position

    • Optionalv: any

      an optional vector object where to put the return values

    Returns Vector2d