Phaser API Documentation

  Version: 
<static> CullBounds(layer, camera)

Description:

Returns the bounds in the given orthogonal layer that are within the cameras viewport. This is used internally by the cull tiles function.

Parameters:

name type description
layer Phaser.Tilemaps.LayerData

The Tilemap Layer to act upon.

camera Phaser.Cameras.Scene2D.Camera

The Camera to run the cull check against.

Returns:
Description:

A rectangle containing the culled bounds. If you wish to retain this object, clone it, as it's recycled internally.

Since: 3.50.0