Adjusts the target rectangle, changing its width, height and position, so that it fits inside the area of the source rectangle, while maintaining its original aspect ratio.
Unlike the FitOutside
function, there may be some space inside the source area not covered.
name | type | description |
---|---|---|
target | Phaser.Geom.Rectangle |
The target rectangle to adjust. |
source | Phaser.Geom.Rectangle |
The source rectangle to envelop the target in. |
The modified target rectangle instance.