Phaser API Documentation

  Version: 
setRenderOrder(renderOrder)

Description:

Sets the rendering (draw) order of the tiles in this layer.

The default is 'right-down', meaning it will order the tiles starting from the top-left, drawing to the right and then moving down to the next row.

The draw orders are:

0 = right-down 1 = left-down 2 = right-up 3 = left-up

Setting the render order does not change the tiles or how they are stored in the layer, it purely impacts the order in which they are rendered.

You can provide either an integer (0 to 3), or the string version of the order.

Parameters:

name type description
renderOrder number | string

The render (draw) order value. Either an integer between 0 and 3, or a string: 'right-down', 'left-down', 'right-up' or 'left-up'.

Returns:
Description:

This Tilemap Layer object.

Since: 3.50.0