Interface: Renderer

Renderer

A Renderer is responsible for rendering tiles of a given Geometry, according to a given View, onto a Stage.

This is an abstract interface.

Methods

endLayer(layer, rect)

Signals the end of a frame for a layer.

Must be matched by an earlier call to Renderer#startFrame with the same arguments. Calls to Renderer#renderTile must occur in between.

Parameters:
Name Type Description
layer Layer

The layer onto which to render.

rect Rect

The rectangular region into which to render.

renderTile(tile, texture, layer, layerZ)

Renders a tile into a layer within the current frame.

Parameters:
Name Type Description
tile Tile

The tile to be rendered.

texture Texture

The texture to be rendered.

layer Layer

The layer onto which to render.

layerZ number

The z-index of the tile within the layer.

startLayer(layer, rect)

Signals the start of a frame for a layer.

Must be matched by a later call to Renderer#endFrame with the same arguments. Calls to Renderer#renderTile must occur in between.

Parameters:
Name Type Description
layer Layer

The layer onto which to render.

rect Rect

The rectangular region into which to render.