Interface ITilemapConfig

Base Tilemap class configuration

Date

3/14/2023 - 12:44:55 PM

Export

Interface

ITilemapConfig

Hierarchy

Properties

baseTileDimensions?: IRectangle3

The base dimensions of tiles that comprise the map. In 2D Tilemaps this would ideally be squares, { x: 32, y: 32 }. Isometric tilemaps expect a depth field to correctly place tiles at z > 0

Date

3/14/2023 - 12:44:55 PM

baseTileOrigin?: IPoint

The anchor point at which tiles are expected to be drawn to screen, defaults to MIDDLE

Date

3/14/2023 - 12:44:55 PM

getScreenDimensions?: (() => IRectangle)

Type declaration

    • (): IRectangle
    • A getter function that retuns the screen dimensions of the canvas

      Date

      3/14/2023 - 12:44:55 PM

      Example

      getScreenDimensions: () => { width: 400, height: 400 }
      

      Returns IRectangle

getWorldPosition?: (() => IPoint)

Type declaration

    • (): IPoint
    • A getter function that returns the world offset, this defaults to () => { x: 0, y: 0 }

      Date

      3/14/2023 - 12:44:55 PM

      Example

      const world = new PIXI.Container()
      getWorldPosition: () => world.position

      Returns IPoint

getWorldScale?: (() => IPoint)

Type declaration

    • (): IPoint
    • A getter function that returns the world scale, this defaults to () => { x: 1, y: 1 }

      Date

      3/14/2023 - 12:44:55 PM

      Example

      const world = new PIXI.Container()
      getWorldPosition: () => world.scale

      Returns IPoint

worldOrigin?: IPoint

The screen offset for the 0,0 tile coordinate, defaults to 'MIDDLE'

Date

3/14/2023 - 12:44:55 PM

Generated using TypeDoc