me.TMXHexagonalRenderer(map)

new TMXHexagonalRenderer(map)

an Hexagonal Map Renderder

Parameters:
Name Type Description
map me.TMXTileMap

the TMX map

Extends

Methods

canRender(component) → {boolean}

return true if the renderer can render the specified map or layer

Parameters:
Name Type Description
component me.TMXTileMap | me.TMXLayer

TMX Map or Layer

Returns:
boolean
Inherited From:

drawTile(renderer, x, y, tile)

draw the given tile at the specified layer

Parameters:
Name Type Description
renderer me.CanvasRenderer | me.WebGLRenderer

a renderer object

x Number

X coordinate where to draw the tile

y Number

Y coordinate where to draw the tile

tile me.Tile

the tile object to draw

Inherited From:

drawTileLayer(renderer, layer, rect)

draw the given TMX Layer for the given area

Parameters:
Name Type Description
renderer me.CanvasRenderer | me.WebGLRenderer

a renderer object

layer me.TMXLayer

a TMX Layer object

rect me.Rect

the area of the layer to draw

Inherited From:

getBounds(layeropt) → {me.Rect}

return the bounding rect for this map renderer

Parameters:
Name Type Attributes Description
layer me.TMXLayer <optional>

calculate the bounding rect for a specific layer (will return a new bounds object)

Returns:
me.Rect
Overrides:

pixelToTileCoords(x, y, vectoropt) → {me.Vector2d}

return the tile position corresponding to the specified pixel

Parameters:
Name Type Attributes Description
x Number

X coordinate

y Number

Y coordinate

vector me.Vector2d <optional>

an optional vector object where to put the return values

Returns:
me.Vector2d
Inherited From:

tileToPixelCoords(col, row, vectoropt) → {me.Vector2d}

return the pixel position corresponding of the specified tile

Parameters:
Name Type Attributes Description
col Number

tile horizontal position

row Number

tile vertical position

vector me.Vector2d <optional>

an optional vector object where to put the return values

Returns:
me.Vector2d
Inherited From: