Phaser API Documentation

  Version: 
setCullPadding([paddingX], [paddingY])

Description:

When a Camera culls the tiles in this layer it does so using its view into the world, building up a rectangle inside which the tiles must exist or they will be culled. Sometimes you may need to expand the size of this 'cull rectangle', especially if you plan on rotating the Camera viewing the layer. Do so by providing the padding values. The values given are in tiles, not pixels. So if the tile width was 32px and you set paddingX to be 4, it would add 32px x 4 to the cull rectangle (adjusted for scale)

Parameters:

name type arguments Default description
paddingX number <optional> 1

The amount of extra horizontal tiles to add to the cull check padding.

paddingY number <optional> 1

The amount of extra vertical tiles to add to the cull check padding.

Returns:
Description:

This Tilemap Layer object.

Since: 3.50.0