I would imagine:
{number} = Phaser.Geom.Rectangle.WrapX(rectangle, x)
{number} = Phaser.Geom.Rectangle.WrapY(rectangle, y)
{void} = Phaser.Physics.Arcade.World#wrap(body)
I'm happy to have this as a feature specifically in Arcade.World, but not as a method on Rectangle as it feels unrelated to geometry really.
Would Phaser.Actions.Wrap(items, rectangle) be appropriate?
I'm just thinking people might want to wrap within other boundaries as well.
Sure, it could be an Action as those are easy to exclude from custom builds, so doesn't add to the weight.
I'll try a PR.
Most helpful comment
I'm happy to have this as a feature specifically in Arcade.World, but not as a method on Rectangle as it feels unrelated to geometry really.