Adjusts the target rectangle, changing its width, height and position, so that it fully covers the area of the source rectangle, while maintaining its original aspect ratio.
Unlike the FitInside
function, the target rectangle may extend further out than the source.
name | type | description |
---|---|---|
target | Phaser.Geom.Rectangle |
The target rectangle to adjust. |
source | Phaser.Geom.Rectangle |
The source rectangle to envelope the target in. |
The modified target rectangle instance.