Constructs new Rectangle or repositions and resizes an existing Rectangle so that all of the given points are on or within its bounds.
name | type | arguments | description |
---|---|---|---|
points | array |
An array of points (either arrays with two elements corresponding to the X and Y coordinate or an object with public |
|
out | Phaser.Geom.Rectangle | <optional> |
Optional Rectangle to adjust. |
The adjusted out
Rectangle, or a new Rectangle if none was provided.