Phaser API Documentation

  Version: 
<static> MergeRect(target, source)

Description:

Merges the source rectangle into the target rectangle and returns the target. Neither rectangle should have a negative width or height.

Parameters:

name type description
target Phaser.Geom.Rectangle

Target rectangle. Will be modified to include source rectangle.

source Phaser.Geom.Rectangle

Rectangle that will be merged into target rectangle.

Returns:
Description:

Modified target rectangle that contains source rectangle.

Since: 3.0.0