phaser
Version:
A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers from the team at Phaser Studio Inc.
727 lines (678 loc) • 7.6 MB
TypeScript
// DO NOT EDIT THIS FILE! It was generated by running `npm run tsgen`
/// <reference types="./matter" />
declare type DataEachCallback = (parent: any, key: string, value: any, ...args: any[])=>void;
/**
* A callback function to be invoked once the DOM content is fully loaded and the device is ready.
*/
declare type ContentLoadedCallback = ()=>void;
declare type CreateCallback = (bob: Phaser.GameObjects.Bob, index: number)=>void;
declare type EachContainerCallback<I> = (item: any, ...args: any[])=>void;
declare type LightForEach = (light: Phaser.GameObjects.Light)=>void;
/**
* A custom function that will be responsible for wrapping the text.
*/
declare type TextStyleWordWrapCallback = (text: string, textObject: Phaser.GameObjects.Text)=>string | string[];
declare type CenterFunction = (triangle: Phaser.Geom.Triangle)=>Phaser.Math.Vector2;
/**
* The Phaser namespace is the root namespace for the entire Phaser game framework.
* It contains all sub-namespaces, classes, and constants that make up the framework,
* including the Game class, Scene management, Game Objects, physics systems, input
* handling, asset loading, cameras, tweens, tilemaps, and more.
*
* When Phaser is built as a bundle, this namespace is also exported to `Phaser`,
* making it available as a browser global.
*/
declare namespace Phaser {
namespace Actions {
/**
* Adds a Bloom effect to a Camera or GameObject or list thereof.
*
* Bloom is a phenomenon where bright light spreads across an image.
* It can be used to add to the realism of a scene,
* although too much is obvious and a subtle effect is best.
*
* This Action creates a Bloom effect by applying several Filters to the target.
*
* - `ParallelFilters` splits the filter stream, allowing us to combine
* the results of other filters with the original image.
* The other filters are added to the `top` stream.
* - `Threshold` removes darker colors.
* - `Blur` spreads the remaining bright colors out.
*
* This Action returns an object containing references to these filters.
* You can control their properties directly,
* e.g. if you want to animate the Bloom,
* or if you want to set properties this Action doesn't surface.
*
* The Bloom effect will be destroyed like any other filter on target shutdown.
* To disable or remove the Bloom effect manually, access the `parallelFilters`
* controller in the return object. It holds the other filters.
*
* - `parallelFilters.active = false`: deactivate Bloom
* - `parallelFilters.destroy()`: destroy Bloom
*
* Bloom is best as a full-screen effect. If you apply it to a GameObject with
* alpha regions, it cannot blend the light glow properly with the background.
* This is because the glow should use ADD blend, but the object itself should
* use NORMAL blend, and it can't do both.
* You can still apply bloom to a GameObject,
* but it works best on a solid texture.
* @param items Recipients of the Bloom effect
* @param config Initial configuration of the Bloom effect.
* @returns A list of objects containing the filters which were created.
*/
function AddEffectBloom(items: Phaser.Cameras.Scene2D.Camera | Phaser.GameObjects.GameObject | (Phaser.Cameras.Scene2D.Camera|Phaser.GameObjects.GameObject)[], config?: Phaser.Types.Actions.AddEffectBloomConfig): Phaser.Types.Actions.AddEffectBloomReturn[];
/**
* Adds a Shine effect to a Camera or GameObject or list thereof.
*
* Shine simulates a highlight glancing from a surface.
* It's a brief specular reflection of a bright light,
* typically from a fairly flat surface which only reflects the highlight
* from certain angles.
* In a game, you might use this to highlight an important object,
* convey a sense of glossiness,
* or move an interference band across a transmission.
*
* This Action works by creating several resources.
*
* - A Gradient object generates the region of the shine.
* - A DynamicTexture holds the shine region.
* - A Tween animates the shine region.
* - A Blend filter combines the shine and the image.
* - (Optional) A ParallelFilters filter adds the rest of the image back in.
*
* You may configure the effect in several ways using the `config` parameter.
*
* Use `radius`, `direction` and `scale` to set the gradient orientation.
* Scale defaults to 2, twice the size of the target,
* to guarantee that the highlight leaves the image completely before repeating.
* The radius also adds an extra offset on either side of the image
* so the gradient has space to enter and exit the image.
*
* Use `colorFactor` to control the RGBA color of the highlight.
* You can overdrive this to values greater than 1 to create very bright shine.
* By default, it has a slight red tint to create warm highlights.
*
* Use `displacementMap` and `displacement` to add a Displacement filter
* to the Gradient. This creates the impression of a slightly scuffed surface.
* You may add other filters to the Gradient; they will be rendered into the
* DynamicTexture for use in the final blend.
*
* Use `reveal` to put the effect into reveal mode.
* In this mode, the image is only visible under the shine.
*
* Use `duration`, `yoyo` and `ease` to control the Tween animation.
*
* The resources created in this way will be automatically destroyed
* when the target is destroyed. You may remove them earlier yourself.
* Unless you use them in other systems, they are isolated and safe to destroy.
* (The Tween requires the other resources to exist while it exists.)
*
* When you target multiple objects with this method,
* each creates its own set of resources. Each set is independent,
* and may be destroyed or manipulated without affecting the others.
*
* You can create your own Shine effects using this as a base or as inspiration.
* @param items Recipients of the Shine effect
* @param config Initial configuration of the Shine effect.
* @returns A list of objects containing the resources which were created.
*/
function AddEffectShine(items: Phaser.Cameras.Scene2D.Camera | Phaser.GameObjects.GameObject | (Phaser.Cameras.Scene2D.Camera|Phaser.GameObjects.GameObject)[], config?: Phaser.Types.Actions.AddEffectShineConfig): Phaser.Types.Actions.AddEffectShineReturn[];
/**
* Apply a Mask to a GameObject or Camera or list thereof using a Shape.
*
* This is a quick way to add a mask to an object/camera.
* It creates a Shape and uses FitToRegion to size it correctly.
*
* By default, the Mask is a circle, scaled to fit both X and Y axes
* of the game canvas (so it's not really a circle any more).
*
* You can change the shape to 'square', 'rectangle', or 'ellipse'.
* Control the shape of rectangles or ellipses via `config.aspectRatio`.
*
* You can change the coverage much like FitToRegion.
* You can scale to fit inside, outside, or both axes.
* You can set the target region; if you do not, the action will choose
* an appropriate region for you.
*
* The action supports an optional Blur effect, applied to the shape.
* This is good for soft edges on masks.
* You can use `config.padding` to shrink the shape region inward, leaving room for the blur to spread outward to the intended boundary.
*
* The Shape is removed from the scene upon creation.
* You don't need to manage its life cycle; it should be garbage collected
* once the Mask filter is destroyed, usually when the scene or target
* is shut down.
* If you want to access the Shape, it is available on the mask filter.
*
* If you apply this to multiple objects at once,
* they all have their own shape and mask filter.
* Note that, if you use external filters, the masks will seem to line up.
* In this case, it might be more efficient to put all the targets into
* a Layer or Container and mask that instead.
* @param items The GameObject or Camera or list thereof to which to apply a mask.
* @param config The configuration of the mask shape.
* @returns The new Mask filters, in order of target.
*/
function AddMaskShape(items: Phaser.GameObjects.GameObject | Phaser.Cameras.Scene2D.Camera | (Phaser.GameObjects.GameObject|Phaser.Cameras.Scene2D.Camera)[], config: Phaser.Types.Actions.AddMaskShapeConfig): Phaser.Filters.Mask[];
/**
* Takes an array of Game Objects and aligns them next to each other.
*
* The alignment position is controlled by the `position` parameter, which should be one
* of the Phaser.Display.Align constants, such as `Phaser.Display.Align.TOP_LEFT`,
* `Phaser.Display.Align.TOP_CENTER`, etc.
*
* The first item isn't moved. The second item is aligned next to the first,
* then the third next to the second, and so on.
* @param items The array of items to be updated by this action.
* @param position The position to align the items with. This is an align constant, such as `Phaser.Display.Align.LEFT_CENTER`.
* @param offsetX Optional horizontal offset from the position, in pixels. Default 0.
* @param offsetY Optional vertical offset from the position, in pixels. Default 0.
* @returns The array of objects that were passed to this Action.
*/
function AlignTo<G extends Phaser.GameObjects.GameObject[]>(items: G, position: number, offsetX?: number, offsetY?: number): G;
/**
* Takes an array of Game Objects, or any objects that have a public `angle` property,
* and then adds the given value to each of their `angle` properties.
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `Angle(group.getChildren(), value, step)`
* @param items The array of items to be updated by this action.
* @param value The amount, in degrees, to be added to the `angle` property.
* @param step This is added to the `value` amount, multiplied by the iteration counter. For example, a `step` of 10 will add 0 to the first item, 10 to the second, 20 to the third, and so on. Default 0.
* @param index An optional offset to start searching from within the items array. Default 0.
* @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1.
* @returns The array of objects that were passed to this Action.
*/
function Angle<G extends Phaser.GameObjects.GameObject[]>(items: G, value: number, step?: number, index?: number, direction?: number): G;
/**
* Takes an array of objects and passes each of them to the given callback.
* @param items The array of items to be updated by this action.
* @param callback The callback to be invoked. It will be passed just one argument: the item from the array.
* @param context The scope in which the callback will be invoked.
* @returns The array of objects that was passed to this Action.
*/
function Call<G extends Phaser.GameObjects.GameObject[]>(items: G, callback: Phaser.Types.Actions.CallCallback, context: any): G;
/**
* Fit GameObjects to a region.
*
* This is a quick way to fit a background to a scene,
* move an object without worrying about origins,
* or cover a hole of known size.
*
* This will transform each object to fit into a rectangular region.
* Rotation is ignored, but translation and scale are changed.
* Note that negative scale will become positive; use flip to resolve this.
* The object must support transformation.
*
* The fit can scale proportionally, to touch the inside or outside of the region;
* but by default it scales both axes independently to touch all sides.
*
* The region is an axis-aligned bounding box (AABB).
* By default, it is derived from the object, via the scene scale properties,
* i.e. `{ x: 0, y: 0, width: scene.scale.width, height: scene.scale.height }`.
*
* If the game object has no size or origin, e.g. a Container,
* then it is tricky to figure out how to resize it to fit.
* The `itemCoverage` parameter allows you to set `width`, `height`, `originX`
* and/or `originY` properties to supplement available data.
* These settings take precedence over original item properties, even if they exist.
* @param items The GameObject or GameObjects to fit to the region. Each must have the Phaser.GameObjects.Components.Transform component.
* @param scaleMode The scale mode. 0 sets each axis to fill the region independently. -1 scales both axes uniformly so the item touches the _inside_ of the region. 1 scales both axes uniformly so the item touches the _outside_ of the region. Default 0.
* @param region The region to fit. If not defined, it will be inferred from the first item's scene scale.
* @param itemCoverage Override or define the region covered by the item. This is intended to provide dimensions for objects which don't have them, such as Containers, allowing them to resize.
* @returns - The items that were fitted.
*/
function FitToRegion(items: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], scaleMode?: number, region?: Phaser.Types.Math.RectangleLike, itemCoverage?: Phaser.Types.Actions.FitToRegionItemCoverage): Phaser.GameObjects.GameObject[];
/**
* Takes an array of objects and returns the first element in the array that has properties which match
* all of those specified in the `compare` object. For example, if the compare object was: `{ scaleX: 0.5, alpha: 1 }`
* then it would return the first item which had the property `scaleX` set to 0.5 and `alpha` set to 1.
*
* To use this with a Group: `GetFirst(group.getChildren(), compare, index)`
* @param items The array of items to be searched by this action.
* @param compare The comparison object. Each property in this object will be checked against the items of the array.
* @param index An optional offset to start searching from within the items array. Default 0.
* @returns The first object in the array that matches the comparison object, or `null` if no match was found.
*/
function GetFirst<G extends Phaser.GameObjects.GameObject[]>(items: G, compare: object, index?: number): object | Phaser.GameObjects.GameObject | null;
/**
* Takes an array of objects and returns the last element in the array that has properties which match
* all of those specified in the `compare` object. For example, if the compare object was: `{ scaleX: 0.5, alpha: 1 }`
* then it would return the last item which had the property `scaleX` set to 0.5 and `alpha` set to 1.
*
* To use this with a Group: `GetLast(group.getChildren(), compare, index)`
* @param items The array of items to be searched by this action.
* @param compare The comparison object. Each property in this object will be checked against the items of the array.
* @param index An optional offset to start searching from within the items array. Default 0.
* @returns The last object in the array that matches the comparison object, or `null` if no match was found.
*/
function GetLast<G extends Phaser.GameObjects.GameObject[]>(items: G, compare: object, index?: number): object | Phaser.GameObjects.GameObject | null;
/**
* Takes an array of Game Objects, or any objects that have public `x` and `y` properties,
* and positions them in a grid layout based on the configuration provided.
*
* The grid is defined by a `width` (number of columns) and/or `height` (number of rows).
* Each cell in the grid has a size defined by `cellWidth` and `cellHeight`, in pixels.
* Items are placed into cells starting from the top-left origin (`x`, `y`) and filling
* left-to-right, top-to-bottom by default. If only `width` is set to -1, items are laid
* out in a single horizontal row. If only `height` is set to -1, items are laid out in a
* single vertical column. When both `width` and `height` are set, the grid fills
* row-by-row, stopping early if the grid is full before all items have been placed.
*
* The `position` option controls how each item is aligned within its cell, using one of
* the `Phaser.Display.Align` constants such as `CENTER` or `TOP_LEFT`.
* @param items The array of items to be updated by this action.
* @param options The GridAlign Configuration object.
* @returns The array of objects that were passed to this Action.
*/
function GridAlign<G extends Phaser.GameObjects.GameObject[]>(items: G, options: Phaser.Types.Actions.GridAlignConfig): G;
/**
* Takes an array of Game Objects, or any objects that have a public `alpha` property,
* and then adds the given value to each of their `alpha` properties.
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `IncAlpha(group.getChildren(), value, step)`
* @param items The array of items to be updated by this action.
* @param value The amount to be added to the `alpha` property.
* @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0.
* @param index An optional offset to start searching from within the items array. Default 0.
* @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1.
* @returns The array of objects that were passed to this Action.
*/
function IncAlpha<G extends Phaser.GameObjects.GameObject[]>(items: G, value: number, step?: number, index?: number, direction?: number): G;
/**
* Takes an array of Game Objects, or any objects that have a public `x` property,
* and then adds the given value to each of their `x` properties.
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `IncX(group.getChildren(), value, step)`
* @param items The array of items to be updated by this action.
* @param value The amount to be added to the `x` property.
* @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0.
* @param index An optional offset to start searching from within the items array. Default 0.
* @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1.
* @returns The array of objects that were passed to this Action.
*/
function IncX<G extends Phaser.GameObjects.GameObject[]>(items: G, value: number, step?: number, index?: number, direction?: number): G;
/**
* Takes an array of Game Objects, or any objects that have public `x` and `y` properties,
* and then adds the given value to each of them.
*
* The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `IncXY(group.getChildren(), x, y, stepX, stepY)`
* @param items The array of items to be updated by this action.
* @param x The amount to be added to the `x` property.
* @param y The amount to be added to the `y` property. If `undefined` or `null` it uses the `x` value. Default x.
* @param stepX This is added to the `x` amount, multiplied by the iteration counter. Default 0.
* @param stepY This is added to the `y` amount, multiplied by the iteration counter. Default 0.
* @param index An optional offset to start searching from within the items array. Default 0.
* @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1.
* @returns The array of objects that were passed to this Action.
*/
function IncXY<G extends Phaser.GameObjects.GameObject[]>(items: G, x: number, y?: number, stepX?: number, stepY?: number, index?: number, direction?: number): G;
/**
* Takes an array of Game Objects, or any objects that have a public `y` property,
* and then adds the given value to each of their `y` properties.
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `IncY(group.getChildren(), value, step)`
* @param items The array of items to be updated by this action.
* @param value The amount to be added to the `y` property.
* @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0.
* @param index An optional offset to start searching from within the items array. Default 0.
* @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1.
* @returns The array of objects that were passed to this Action.
*/
function IncY<G extends Phaser.GameObjects.GameObject[]>(items: G, value: number, step?: number, index?: number, direction?: number): G;
/**
* Takes an array of Game Objects and positions them on evenly spaced points around the perimeter of a Circle.
*
* If you wish to pass a `Phaser.GameObjects.Circle` Shape to this function, you should pass its `geom` property.
* @param items An array of Game Objects. The contents of this array are updated by this Action.
* @param circle The Circle to position the Game Objects on.
* @param startAngle Optional angle to start position from, in radians. Default 0.
* @param endAngle Optional angle to stop position at, in radians. Default 6.28.
* @returns The array of Game Objects that was passed to this Action.
*/
function PlaceOnCircle<G extends Phaser.GameObjects.GameObject[]>(items: G, circle: Phaser.Geom.Circle, startAngle?: number, endAngle?: number): G;
/**
* Takes an array of Game Objects and positions them on evenly spaced points around the perimeter of an Ellipse.
*
* Each Game Object's `x` and `y` properties are updated in place. The spacing between objects is determined
* by dividing the angular range (from `startAngle` to `endAngle`) evenly across the number of items.
*
* If you wish to pass a `Phaser.GameObjects.Ellipse` Shape to this function, you should pass its `geom` property.
* @param items An array of Game Objects. The contents of this array are updated by this Action.
* @param ellipse The Ellipse to position the Game Objects on.
* @param startAngle Optional angle to start position from, in radians. Default 0.
* @param endAngle Optional angle to stop position at, in radians. Default 6.28.
* @returns The array of Game Objects that was passed to this Action.
*/
function PlaceOnEllipse<G extends Phaser.GameObjects.GameObject[]>(items: G, ellipse: Phaser.Geom.Ellipse, startAngle?: number, endAngle?: number): G;
/**
* Positions an array of Game Objects along a Line, setting each object's `x` and `y` coordinates.
* By default the Game Objects are placed at evenly spaced intervals along the line. If the `ease`
* parameter is supplied, the spacing between points is controlled by that easing function instead,
* allowing for clustered or accelerating distributions along the line.
* @param items An array of Game Objects. The contents of this array are updated by this Action.
* @param line The Line to position the Game Objects on.
* @param ease An optional ease to apply to the point distribution. This can be either a string key from the EaseMap (e.g. `'Sine.easeInOut'`) or a custom easing function. If omitted, points are evenly spaced.
* @returns The array of Game Objects that was passed to this Action.
*/
function PlaceOnLine<G extends Phaser.GameObjects.GameObject[]>(items: G, line: Phaser.Geom.Line, ease?: string | Function): G;
/**
* Takes an array of Game Objects and positions them on evenly spaced points around the perimeter of a Rectangle.
*
* Placement starts from the top-left of the rectangle, and proceeds in a clockwise direction.
* If the `shift` parameter is given you can offset where placement begins.
* @param items An array of Game Objects. The contents of this array are updated by this Action.
* @param rect The Rectangle to position the Game Objects on.
* @param shift An optional starting offset, in number of steps. A positive value shifts the starting position clockwise around the perimeter, a negative value shifts it counter-clockwise. Default 0.
* @returns The array of Game Objects that was passed to this Action.
*/
function PlaceOnRectangle<G extends Phaser.GameObjects.GameObject[]>(items: G, rect: Phaser.Geom.Rectangle, shift?: number): G;
/**
* Takes an array of Game Objects and positions them on evenly spaced points around the edges of a Triangle.
*
* If you wish to pass a `Phaser.GameObjects.Triangle` Shape to this function, you should pass its `geom` property.
* @param items An array of Game Objects. The contents of this array are updated by this Action.
* @param triangle The Triangle to position the Game Objects on.
* @param stepRate An optional step rate that controls the density of points sampled along each edge of the Triangle using Bresenham's line algorithm. A higher value produces fewer, more widely spaced points; a lower value produces more points and denser placement. Default 1.
* @returns The array of Game Objects that was passed to this Action.
*/
function PlaceOnTriangle<G extends Phaser.GameObjects.GameObject[]>(items: G, triangle: Phaser.Geom.Triangle, stepRate?: number): G;
/**
* Play an animation on all Game Objects in the array that have an Animation component.
*
* You can pass either an animation key, or an animation configuration object for more control over the playback.
* @param items An array of Game Objects. The contents of this array are updated by this Action.
* @param key The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object.
* @param ignoreIfPlaying If this animation is already playing then ignore this call. Default false.
* @returns The array of Game Objects that was passed to this Action.
*/
function PlayAnimation<G extends Phaser.GameObjects.GameObject[]>(items: G, key: string | Phaser.Animations.Animation | Phaser.Types.Animations.PlayAnimationConfig, ignoreIfPlaying?: boolean): G;
/**
* Takes an array of Game Objects, or any objects that have a public property as defined in `key`,
* and then adds the given value to it.
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `PropertyValueInc(group.getChildren(), key, value, step)`
* @param items The array of items to be updated by this action.
* @param key The property to be updated.
* @param value The amount to be added to the property.
* @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0.
* @param index An optional offset to start searching from within the items array. Default 0.
* @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1.
* @returns The array of objects that were passed to this Action.
*/
function PropertyValueInc<G extends Phaser.GameObjects.GameObject[]>(items: G, key: string, value: number, step?: number, index?: number, direction?: number): G;
/**
* Takes an array of Game Objects, or any objects that have a public property as defined in `key`,
* and then sets it to the given value.
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `PropertyValueSet(group.getChildren(), key, value, step)`
* @param items The array of items to be updated by this action.
* @param key The property to be updated.
* @param value The amount to set the property to.
* @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0.
* @param index An optional offset to start searching from within the items array. Default 0.
* @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1.
* @returns The array of objects that were passed to this Action.
*/
function PropertyValueSet<G extends Phaser.GameObjects.GameObject[]>(items: G, key: string, value: number, step?: number, index?: number, direction?: number): G;
/**
* Takes an array of Game Objects and positions them at random locations within the Circle.
*
* If you wish to pass a `Phaser.GameObjects.Circle` Shape to this function, you should pass its `geom` property.
* @param items An array of Game Objects. The contents of this array are updated by this Action.
* @param circle The Circle to position the Game Objects within.
* @returns The array of Game Objects that was passed to this Action.
*/
function RandomCircle<G extends Phaser.GameObjects.GameObject[]>(items: G, circle: Phaser.Geom.Circle): G;
/**
* Takes an array of Game Objects and positions them at random locations within the Ellipse.
*
* If you wish to pass a `Phaser.GameObjects.Ellipse` Shape to this function, you should pass its `geom` property.
* @param items An array of Game Objects. The contents of this array are updated by this Action.
* @param ellipse The Ellipse to position the Game Objects within.
* @returns The array of Game Objects that was passed to this Action.
*/
function RandomEllipse<G extends Phaser.GameObjects.GameObject[]>(items: G, ellipse: Phaser.Geom.Ellipse): G;
/**
* Takes an array of Game Objects and positions them at random locations on the Line.
*
* If you wish to pass a `Phaser.GameObjects.Line` Shape to this function, you should pass its `geom` property.
* @param items An array of Game Objects. The contents of this array are updated by this Action.
* @param line The Line to position the Game Objects randomly on.
* @returns The array of Game Objects that was passed to this Action.
*/
function RandomLine<G extends Phaser.GameObjects.GameObject[]>(items: G, line: Phaser.Geom.Line): G;
/**
* Takes an array of Game Objects and positions them at random locations within the Rectangle.
* @param items An array of Game Objects. The contents of this array are updated by this Action.
* @param rect The Rectangle to position the Game Objects within.
* @returns The array of Game Objects that was passed to this Action.
*/
function RandomRectangle<G extends Phaser.GameObjects.GameObject[]>(items: G, rect: Phaser.Geom.Rectangle): G;
/**
* Takes an array of Game Objects and positions them at random locations within the Triangle.
*
* If you wish to pass a `Phaser.GameObjects.Triangle` Shape to this function, you should pass its `geom` property.
* @param items An array of Game Objects. The contents of this array are updated by this Action.
* @param triangle The Triangle to position the Game Objects within.
* @returns The array of Game Objects that was passed to this Action.
*/
function RandomTriangle<G extends Phaser.GameObjects.GameObject[]>(items: G, triangle: Phaser.Geom.Triangle): G;
/**
* Takes an array of Game Objects, or any objects that have a public `rotation` property,
* and then adds the given value to each of their `rotation` properties.
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `Rotate(group.getChildren(), value, step)`
* @param items The array of items to be updated by this action.
* @param value The amount to be added to the `rotation` property (in radians).
* @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0.
* @param index An optional offset to start searching from within the items array. Default 0.
* @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1.
* @returns The array of objects that were passed to this Action.
*/
function Rotate<G extends Phaser.GameObjects.GameObject[]>(items: G, value: number, step?: number, index?: number, direction?: number): G;
/**
* Rotates each item around the given point by the given angle.
* @param items An array of Game Objects. The contents of this array are updated by this Action.
* @param point Any object with public `x` and `y` properties.
* @param angle The angle to rotate by, in radians.
* @returns The array of Game Objects that was passed to this Action.
*/
function RotateAround<G extends Phaser.GameObjects.GameObject[]>(items: G, point: object, angle: number): G;
/**
* Rotates each Game Object in the given array around a point by the specified angle, positioning each item at the given distance from that point. If the distance is zero, the items are not moved.
* @param items An array of Game Objects. The contents of this array are updated by this Action.
* @param point Any object with public `x` and `y` properties.
* @param angle The angle to rotate by, in radians.
* @param distance The distance from the point of rotation in pixels.
* @returns The array of Game Objects that was passed to this Action.
*/
function RotateAroundDistance<G extends Phaser.GameObjects.GameObject[]>(items: G, point: object, angle: number, distance: number): G;
/**
* Takes an array of Game Objects, or any objects that have a public `scaleX` property,
* and then adds the given value to each of their `scaleX` properties.
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `ScaleX(group.getChildren(), value, step)`
* @param items The array of items to be updated by this action.
* @param value The amount to be added to the `scaleX` property.
* @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0.
* @param index An optional offset to start searching from within the items array. Default 0.
* @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1.
* @returns The array of objects that were passed to this Action.
*/
function ScaleX<G extends Phaser.GameObjects.GameObject[]>(items: G, value: number, step?: number, index?: number, direction?: number): G;
/**
* Takes an array of Game Objects, or any objects that have public `scaleX` and `scaleY` properties,
* and then adds the given value to each of them.
*
* The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `ScaleXY(group.getChildren(), scaleX, scaleY, stepX, stepY)`
* @param items The array of items to be updated by this action.
* @param scaleX The amount to be added to the `scaleX` property.
* @param scaleY The amount to be added to the `scaleY` property. If `undefined` or `null` it uses the `scaleX` value.
* @param stepX This is added to the `scaleX` amount, multiplied by the iteration counter. Default 0.
* @param stepY This is added to the `scaleY` amount, multiplied by the iteration counter. Default 0.
* @param index An optional offset to start searching from within the items array. Default 0.
* @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1.
* @returns The array of objects that were passed to this Action.
*/
function ScaleXY<G extends Phaser.GameObjects.GameObject[]>(items: G, scaleX: number, scaleY?: number, stepX?: number, stepY?: number, index?: number, direction?: number): G;
/**
* Takes an array of Game Objects, or any objects that have a public `scaleY` property,
* and then adds the given value to each of their `scaleY` properties.
*
* The optional `step` parameter is applied incrementally, multiplied by the iteration index of each item in the array.
*
* To use this with a Group: `ScaleY(group.getChildren(), value, step)`
* @param items The array of items to be updated by this action.
* @param value The amount to be added to the `scaleY` property.
* @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0.
* @param index An optional offset to start searching from within the items array. Default 0.
* @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1.
* @returns The array of objects that were passed to this Action.
*/
function ScaleY<G extends Phaser.GameObjects.GameObject[]>(items: G, value: number, step?: number, index?: number, direction?: number): G;
/**
* Takes an array of Game Objects, or any objects that have the public property `alpha`
* and then sets it to the given value.
*
* The optional `step` property is applied incrementally, multiplied by the iteration index and added to `value`.
*
* To use this with a Group: `SetAlpha(group.getChildren(), value, step)`
* @param items The array of items to be updated by this action.
* @param value The alpha value to set on each item. Should be in the range 0 (fully transparent) to 1 (fully opaque).
* @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0.
* @param index An optional offset to start searching from within the items array. Default 0.
* @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1.
* @returns The array of objects that were passed to this Action.
*/
function SetAlpha<G extends Phaser.GameObjects.GameObject[]>(items: G, value: number, step?: number, index?: number, direction?: number): G;
/**
* Takes an array of Game Objects, or any objects that have the public property `blendMode`
* and then sets it to the given value.
*
* To use this with a Group: `SetBlendMode(group.getChildren(), value)`
* @param items The array of items to be updated by this action.
* @param value The Blend Mode to be set.
* @param index An optional offset to start searching from within the items array. Default 0.
* @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1.
* @returns The array of objects that were passed to this Action.
*/
function SetBlendMode<G extends Phaser.GameObjects.GameObject[]>(items: G, value: Phaser.BlendModes | string | number, index?: number, direction?: number): G;
/**
* Takes an array of Game Objects, or any objects that have the public property `depth`,
* and then sets it to the given value. The `depth` property controls the rendering order
* of Game Objects within a Scene: objects with higher depth values are rendered on top
* of those with lower values.
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `SetDepth(group.getChildren(), value, step)`
* @param items The array of items to be updated by this action.
* @param value The depth value to assign to each item.
* @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0.
* @param index An optional offset to start searching from within the items array. Default 0.
* @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1.
* @returns The array of objects that were passed to this Action.
*/
function SetDepth<G extends Phaser.GameObjects.GameObject[]>(items: G, value: number, step?: number, index?: number, direction?: number): G;
/**
* Iterates over all items in the given array and calls `setInteractive` on each one, applying the same hit area shape and callback to every Game Object in the array.
* @param items An array of Game Objects. The contents of this array are updated by this Action.
* @param hitArea Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame.
* @param hitAreaCallback The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback.
* @returns The array of Game Objects that was passed to this Action.
*/
function SetHitArea<G extends Phaser.GameObjects.GameObject[]>(items: G, hitArea?: Phaser.Types.Input.InputConfiguration | any, hitAreaCallback?: Phaser.Types.Input.HitAreaCallback): G;
/**
* Takes an array of Game Objects, or any objects that have the public properties `originX` and `originY`
* and then sets them to the given values.
*
* The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `SetOrigin(group.getChildren(), originX, originY, stepX, stepY)`
* @param items The array of items to be updated by this action.
* @param originX The amount to set the `originX` property to.
* @param originY The amount to set the `originY` property to. If `undefined` or `null` it uses the `originX` value.
* @param stepX This is added to the `originX` amount, multiplied by the iteration counter. Default 0.
* @param stepY This is added to the `originY` amount, multiplied by the iteration counter. Default 0.
* @param index An optional offset to start searching from within the items array. Default 0.
* @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1.
* @returns The array of objects that were passed to this Action.
*/
function SetOrigin<G extends Phaser.GameObjects.GameObject[]>(items: G, originX: number, originY?: number, stepX?: number, stepY?: number, index?: number, direction?: number): G;
/**
* Takes an array of Game Objects, or any objects that have the public property `rotation`
* and then sets it to the given value.
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `SetRotation(group.getChildren(), value, step)`
* @param items The array of items to be updated by this action.
* @param value The amount to set the property to (in radians).
* @param step This value, multiplied by the iteration index, is added to `value` for each successive item, resulting in each object receiving a progressively stepped rotation (in radians). Default 0.
* @param index An optional offset to start searching from within the items array. Default 0.
* @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1.
* @returns The array of objects that were passed to this Action.
*/
function SetRotation<G extends Phaser.GameObjects.GameObject[]>(items: G, value: number, step?: number, index?: number, direction?: number): G;
/**
* Takes an array of Game Objects, or any objects that have the public properties `scaleX` and `scaleY`
* and then sets them to the given values.
*
* The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `SetScale(group.getChildren(), scaleX, scaleY, stepX, stepY)`
* @param items The array of items to be updated by this action.
* @param scaleX The amount to set the `scaleX` property to.
* @param scaleY The amount to set the `scaleY` property to. If `undefined` or `null` it uses the `scaleX` value.
* @param stepX This is added to the `scaleX` amount, multiplied by the iteration counter. Default 0.
* @param stepY This is added to the `scaleY` amount, multiplied by the iteration counter. Default 0.
* @param index An optional offset to start searching from within the items array. Default 0.
* @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1.
* @returns The array of objects that were passed to this Action.
*/
function SetScale<G extends Phaser.GameObjects.GameObject[]>(items: G, scaleX: number, scaleY?: number, stepX?: number, stepY?: number, index?: number, direction?: number): G;
/**
* Takes an array of Game Objects, or any objects that have the public property `scaleX`
* and then sets it to the given value.
*
* The optional `step` property is applied incrementally, multiplied by the iteration counter.
*
* To use this with a Group: `SetScaleX(group.getChildren(), value, step)`
* @param items The array of items to be updated by this action.
* @param value The value to set the `scaleX` property to.
* @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0.
* @param index An optional offset to start searching from within the items array. Default 0.
* @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1.
* @returns The array of objects that were passed to this Action.
*/
function SetScaleX<G extends Phaser.GameObjects.GameObject[]>(items: G, value: number, step?: number, index?: number, direction?: number): G;
/**
* Takes an array of Game Objects, or any objects that have the public property `scaleY`
* and then sets it to the given value.
*
* The optional `step` property is applied incrementally, multiplied by the iteration counter.
*
* To use this with a Group: `SetScaleY(group.getChildren(), value, step)`
* @param items The array of items to be updated by this action.
* @param val