Phaser API Documentation

  Version: 
<static> MergePoints(target, points)

Description:

Merges a Rectangle with a list of points by repositioning and/or resizing it such that all points are located on or within its bounds.

Parameters:

name type description
target Phaser.Geom.Rectangle

The Rectangle which should be merged.

points Array.<Phaser.Geom.Point>

An array of Points (or any object with public x and y properties) which should be merged with the Rectangle.

Returns:
Description:

The modified Rectangle.

Since: 3.0.0