Phaser API Documentation

  Version: 

Member of: Phaser.Actions

<static> WrapInRectangle(items, rect, [padding])

Description:

Wrap each item's coordinates within a rectangle's area.

Parameters:

name type arguments description
items array | Array.<Phaser.GameObjects.GameObject>

An array of Game Objects. The contents of this array are updated by this Action.

rect Phaser.Geom.Rectangle

The rectangle.

padding number <optional>

An amount added to each side of the rectangle during the operation.

Returns:
Description:

The array of Game Objects that was passed to this Action.

Type:
Examples:
Since: 3.0.0